/* Europa-Magazin — Dune theme styles */

/* Merriweather - self-hosted WOFF2 */
@font-face {
  font-family: "Merriweather";
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url("/static/fonts/merriweather-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Merriweather";
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url("/static/fonts/merriweather-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Merriweather";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/static/fonts/merriweather-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Merriweather";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/static/fonts/merriweather-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --color-primary: #000;
  --color-secondary: #ffcc00;
  --color-background: #f5f5f5;
  --color-text: #000;
  --color-muted: #666;
  --color-border: #c9a961;
  --color-sidebar-bg: #f1e6df;
  --color-link: #866127;
  --color-link-hover: #6b4d1a;
  --color-heading: #000;
  --font-main: "Merriweather", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font-main);
  background: white;
  color: var(--color-text);
  line-height: 1.7;
  font-size: 15px;
}

a { color: var(--color-link); text-decoration: none; }
a:hover { color: var(--color-link-hover); text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────── */

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: white;
}

.layout-container {
  display: flex;
  flex: 1;
  max-width: 100%;
  margin-left: auto;
  margin-right: 0;
  width: 100%;
  background: white;
  align-items: flex-start;
}

.layout-container:has(.sidebar.open),
.layout-container:not(:has(.sidebar.open)):not(:has(.sidebar.closed)) {
  gap: max(0px, calc((100vw - 1200px) / 4));
}
.layout-container:has(.sidebar.closed) { gap: 0; }

.main-content {
  flex: 1;
  padding: 0 2rem 2rem 2rem;
  position: relative;
  min-width: 0;
  overflow-wrap: break-word;
  max-width: 1200px;
  margin-left: max(0px, calc((100vw - 1200px) / 4));
  container-type: inline-size;
  container-name: content;
  --font-size-small: 12px;
}

.layout-container:has(.sidebar.closed) .main-content {
  margin-right: max(0px, calc((100vw - 1200px) / 2 + 200px));
}

/* ── Content font scaling (container queries) ─────────── */

.content-page, .tag-page { font-size: 13px; }

@container content (min-width: 400px) {
  .main-content { --font-size-small: 12px; }
  .main-content .breadcrumbs, .main-content .site-footer p { font-size: 12px; }
  .content-page, .tag-page { font-size: 14px; }
}
@container content (min-width: 600px) {
  .main-content { --font-size-small: 13px; }
  .main-content .breadcrumbs, .main-content .site-footer p { font-size: 13px; }
  .content-page, .tag-page { font-size: 16px; }
}
@container content (min-width: 800px) {
  .main-content { --font-size-small: 14px; }
  .main-content .breadcrumbs, .main-content .site-footer p { font-size: 14px; }
  .content-page, .tag-page { font-size: 17px; }
}
@container content (min-width: 1000px) {
  .main-content { --font-size-small: 15px; }
  .main-content .breadcrumbs, .main-content .site-footer p { font-size: 15px; }
  .content-page, .tag-page { font-size: 18px; }
}
@container content (min-width: 1200px) {
  .main-content { --font-size-small: 16px; }
  .main-content .breadcrumbs, .main-content .site-footer p { font-size: 16px; }
  .content-page, .tag-page { font-size: 20px; }
}

/* ── Header / navigation ─────────────────────────────── */

.header-navigation {
  position: absolute;
  top: 0; left: 0; right: 0;
  pointer-events: none;
}
.header-navigation > * { pointer-events: auto; position: absolute; }

.search-icon-link {
  top: calc(1rem + 8px);
  left: 28px;
  display: block;
  color: var(--color-link);
  text-decoration: none;
  z-index: 10;
}
.search-icon { width: 24px; height: 24px; cursor: pointer; transition: color 0.2s; }
.search-icon:hover { color: var(--color-link-hover); }

/* Logo top-right, breadcrumbs beside it when they fit and wrapped below it
   when they don't (row-reverse + wrap; the logo is first in `order`). */
.content-header {
  position: relative;
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  align-items: flex-end;
  column-gap: 20px;
  row-gap: 0.5rem;
  padding: 0.5rem 0;
  margin-bottom: 0.75rem;
}

.breadcrumbs {
  order: 2;
  flex: 1 1 auto;
  margin-bottom: 2px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 12px;
}

.content-logo {
  width: auto; height: auto; max-width: 100%;
}

.content-header > a { order: 1; max-width: 60%; display: inline-block; }

.breadcrumb-item {
  display: inline-block;
  color: var(--color-link);
  text-decoration: none;
  white-space: nowrap;
}
.breadcrumb-item:hover { color: var(--color-link-hover); text-decoration: underline; }

button.back-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
}

.home-link {
  display: inline-flex; align-items: center; gap: 0.35em;
}
.home-icon {
  font-size: 1.65em; line-height: 0.75;
  display: inline-flex; align-items: center; justify-content: center;
  height: 1em; margin-top: -0.1em;
}
.breadcrumbs .tag-link { font-weight: 500; }

/* ── Sidebar ─────────────────────────────────────────── */

.sidebar {
  background: var(--color-sidebar-bg);
  width: 240px;
  border-left: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  min-height: 100vh;
  flex-shrink: 0;
  transition: width 0.3s ease;
  container-type: inline-size;
  container-name: sidebar;
}

.sidebar.closed { width: 40px; overflow: hidden; }
.sidebar.closed .sidebar-content { display: none; }

.sidebar-toggle {
  position: fixed;
  top: 1rem; right: 0.5rem;
  background: white;
  border: none; cursor: pointer;
  padding: 0.25rem;
  color: var(--color-link);
  font-size: 1.5rem; line-height: 1;
  z-index: 100;
  transition: color 0.2s;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.sidebar-toggle:hover { color: var(--color-link-hover); }
.toggle-icon { display: block; }

@media (max-width: 899px) {
  .sidebar { width: 40px; }
  .sidebar .sidebar-content { display: none; }
  .sidebar.open { width: 240px !important; }
  .sidebar.open .sidebar-content { display: block; }
}
@media (max-width: 600px) {
  .sidebar {
    width: 0 !important; min-width: 0 !important; max-width: 0 !important;
    flex-basis: 0 !important; overflow: hidden;
    border-left: none; padding: 0 !important;
  }
  .sidebar.open {
    width: 240px !important; max-width: 240px !important;
    position: fixed; right: 0; top: 0; bottom: 0;
    z-index: 1000; overflow-y: auto; padding: 0 !important;
  }
}

@media (min-width: 601px) {
  .sidebar.open { width: max(240px, calc(240px + (100vw - 1200px) / 4)) !important; }
  .sidebar.closed { width: 40px !important; }
}

/* Above the 899px breakpoint the sidebar is expanded by default (no .open
   class needed) — only .closed collapses it. Scoped to not overlap the
   899px query above, where the default is collapsed until .open is set. */
@media (min-width: 900px) {
  .sidebar:not(.closed) { width: max(240px, calc(240px + (100vw - 1200px) / 4)) !important; }
}

.sidebar-content { padding: 1rem; }

.sidebar-logo {
  text-align: right;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.sidebar-logo img { max-width: 100%; height: auto; mix-blend-mode: multiply; }

.sidebar-title {
  font-size: 0.7em; font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.75rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  text-transform: uppercase; letter-spacing: 1px;
}

.nav-list { list-style: none; }
.nav-list li { margin-bottom: 0.25rem; }

.nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--color-link);
  text-decoration: none;
  font-size: 0.9em;
  transition: all 0.2s;
  border-left: 2px solid transparent;
}
.nav-link:hover {
  color: var(--color-link-hover);
  background: rgba(158, 114, 46, 0.05);
  border-left-color: var(--color-link-hover);
}
.nav-link.active {
  background: rgba(201, 169, 97, 0.15);
  border-left-color: var(--color-border);
  color: #7a5822;
  font-weight: 600;
}

.sidebar-contact {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8em; line-height: 1.6;
  color: var(--color-text);
}
.sidebar-contact p { margin-bottom: 0.4rem; }
.sidebar-contact a { color: var(--color-link); }
.sidebar-contact a:hover { color: var(--color-link-hover); }
.sidebar-contact .bank-info { font-size: 0.9em; line-height: 1.4; }

@container sidebar (min-width: 240px) {
  .nav-link { font-size: 0.9em; }
  .sidebar-contact { font-size: 0.8em; }
}
@container sidebar (min-width: 280px) {
  .nav-link { font-size: 0.95em; }
  .sidebar-contact { font-size: 0.85em; }
}

/* ── Shared content styles ───────────────────────────── */

.content-page h1, .tag-page h1 {
  color: var(--color-primary); font-family: var(--font-main);
  font-size: 2.2em; font-weight: 400;
  margin-top: 2.5rem; margin-bottom: 2rem; line-height: 1.3;
}
.content-page h2, .tag-page h2 {
  color: var(--color-primary); font-family: var(--font-main);
  font-size: 1.9em; font-weight: 400;
  margin-top: 1.5rem; margin-bottom: 0.75rem; line-height: 1.3;
}
.content-page h3, .tag-page h3 {
  color: var(--color-primary); font-family: var(--font-main);
  font-size: 1.6em; font-weight: 400;
  margin-top: 1.25rem; margin-bottom: 0.5rem; line-height: 1.3;
}
.content-page h4, .tag-page h4 {
  color: var(--color-primary); font-family: var(--font-main);
  font-size: 1.3em; font-weight: 400;
  margin-top: 1rem; margin-bottom: 0.5rem; line-height: 1.3;
}
.content-page p, .tag-page p {
  margin-bottom: 1rem; text-align: justify; line-height: 1.7;
}
.content-page ul, .content-page ol, .tag-page ul, .tag-page ol {
  margin-bottom: 1rem; padding-left: 1.5rem;
}
.content-page li, .tag-page li { margin-bottom: 0.5rem; line-height: 1.7; }
.content-page a, .tag-page a { color: var(--color-link); }
.content-page a:hover, .tag-page a:hover { color: var(--color-link-hover); }
.content-page blockquote, .tag-page blockquote, .page blockquote {
  border-left: 3px solid var(--color-secondary, #c8a96e);
  padding-left: 1rem;
  margin: 0 0 1.25rem 0;
  color: #374151;
  font-size: 1.05em;
}

/* CTA buttons inside content-page need explicit colour overrides (specificity) */
.cta-primary,
.content-page .cta-primary {
  background-color: var(--color-link);
  color: white;
}
.cta-primary:hover,
.content-page .cta-primary:hover {
  background-color: var(--color-link-hover);
  color: white;
  text-decoration: none;
}
.cta-secondary,
.content-page .cta-secondary {
  background-color: transparent;
  color: var(--color-link);
  border: 2px solid var(--color-link);
}
.cta-secondary:hover,
.content-page .cta-secondary:hover {
  background-color: var(--color-link-hover);
  color: white;
  text-decoration: none;
}
.content-page hr, .tag-page hr {
  border: none;
  border-bottom: 2px solid var(--color-secondary);
  margin: 2rem 0 1.5rem 0;
}

/* Content meta */
.content-meta {
  font-size: 0.9em; color: #666;
  margin-top: -1rem; margin-bottom: 1rem;
}
.content-meta .issue-link {
  color: inherit; text-decoration: none;
  border-bottom: 1px dotted #999;
}
.content-meta .issue-link:hover {
  color: var(--color-secondary);
  border-bottom-color: var(--color-secondary);
}

/* ── Article page ────────────────────────────────────── */

.article-page-container {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0.5rem 1rem 2rem 1rem;
}

.article-body { margin-bottom: 3rem; }

/* Migrated "box" tables: let long URLs wrap instead of widening the table */
.article-body td, .article-body th { overflow-wrap: anywhere; }

/* Post separator — yellow line */
.post-separator {
  border: none;
  border-top: 2px solid var(--color-secondary);
  margin: 2rem 0;
}

.post-title {
  font-size: 1.25rem; font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--color-text); line-height: 1.3;
}

.post-context {
  display: none;
  margin: -0.5rem 0 1rem 0;
  font-size: 0.875rem; color: #6b7280; line-height: 1.4;
}
.post-context-label { font-style: italic; }

.post-body { margin-bottom: 0; }
.post-body p { margin-bottom: 1rem; line-height: 1.7; }

/* ── Tag / dossier page ──────────────────────────────── */

.tag-page h1 {
  font-size: 2.2em; font-weight: 400;
  margin-top: 2.5rem; margin-bottom: 2rem; line-height: 1.3;
}

.tag-page .content-meta {
  font-size: 0.75em; color: #737373; margin-top: 0.5rem;
}

/* Article list (used on home, dossiers, section indexes) */
/* !important: overrides the generic ".tag-page ul" prose-list indent below —
   this is a structural list of preview cards, not prose, and shouldn't inherit it. */
ul.articles-list { list-style: none; padding-left: 0 !important; }
.article-preview { padding: 0 0 0.5rem; border-bottom: 1px solid #e5e7eb; }
.article-preview:last-child { border-bottom: none; }
.article-preview h2 { font-size: 1.2em; font-weight: 400; margin-bottom: 0.25rem; }
.article-preview h2 a { color: var(--color-link); }
.article-preview h2 a:hover { color: var(--color-link-hover); text-decoration: underline; }
.article-preview .article-excerpt {
  color: #374151; font-size: 0.95em; margin: 0.2rem 0 0.5rem;
}
.article-preview .article-date {
  font-size: 0.85em; color: var(--color-muted); margin-top: 0.25rem;
}

/* Generic article-list (default template) */
/* !important: overrides the generic ".page ul"/".content-page ul" prose-list
   indent (declared later in this file) — same reasoning as .articles-list above. */
ul.article-list { list-style: none; padding-left: 0 !important; }
.article-list-item { padding: 0.4rem 0; border-bottom: 1px solid #f0e8e0; }
.article-list-item:last-child { border-bottom: none; }
.article-list-link { color: var(--color-link); }
.article-list-link:hover { color: var(--color-link-hover); text-decoration: underline; }
.article-date { font-size: 0.85em; color: var(--color-muted); }

/* Tags */
.tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  background: rgba(201, 169, 97, 0.15);
  border-radius: 3px;
  font-size: 0.8em;
  color: var(--color-link);
  margin: 0.2rem 0.2rem 0 0;
}
.tag:hover { background: rgba(201, 169, 97, 0.3); color: var(--color-link-hover); }

/* Button */
.button {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--color-link);
  color: white;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}
.button:hover { background: var(--color-link-hover); color: white; text-decoration: none; }

/* CTA buttons */
.cta-button {
  display: inline-block;
  padding: 0.875rem 2rem;
  font-size: 1.1em;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
  font-family: var(--font-main);
}
.cta-primary { background-color: var(--color-link); color: white; }
.cta-primary:hover { background-color: var(--color-link-hover); color: white; }
.cta-secondary { background-color: transparent; color: var(--color-link); border: 2px solid var(--color-link); }
.cta-secondary:hover { background-color: var(--color-link-hover); color: white; }

/* ── Issue page ──────────────────────────────────────── */

.issues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.issue-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 1.25rem 1rem;
  background: white;
  border: 1px solid #ddd; border-radius: 8px;
  text-decoration: none; color: var(--color-link);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.issue-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(189, 145, 42, 0.25);
  border-color: var(--color-link-hover);
}
.issue-number {
  font-size: 2.8em; font-weight: 400; line-height: 1;
  color: var(--color-link);
}
.issue-brand { font-size: 1em; font-weight: 400; color: #000; margin-bottom: 0.5rem; }
.issue-date { font-size: 0.85em; color: var(--color-muted); margin-top: 0.25rem; }

/* Issue detail page */
/* Issue page — PDF viewer */
.issue-page { padding: 0; }

.pdf-viewer-container { display: flex; flex-direction: column; gap: 0; }

/* Control bar */
.pdf-controls {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--color-border);
  background: var(--color-sidebar-bg); font-size: 0.85em;
  flex-wrap: wrap;
}

.pdf-issue-nav-group {
  display: flex; align-items: center; gap: 0.3rem; margin-right: auto;
}
.pdf-current-issue { font-weight: 600; padding: 0 0.3rem; }
.issue-id { font-size: 0.9em; }

.pdf-page-controls-group {
  display: flex; align-items: center; gap: 0.3rem;
}
.pdf-nav-group { display: flex; align-items: center; gap: 0.1rem; }

.pdf-control-btn {
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: none; border: 1px solid transparent;
  padding: 0.2rem 0.4rem; cursor: pointer; border-radius: 3px;
  color: var(--color-link); font-size: 0.85em; text-decoration: none;
  line-height: 1;
}
.pdf-control-btn:disabled { opacity: 0.35; cursor: default; pointer-events: none; }
.pdf-control-btn:not(:disabled):hover { background: #e8e0d0; border-color: var(--color-border); }

.pdf-page-info { display: flex; align-items: center; gap: 0.25rem; padding: 0 0.3rem; }
.pdf-page-input {
  width: 3rem; text-align: center; border: 1px solid var(--color-border);
  border-radius: 3px; padding: 0.1rem 0.25rem; font: inherit; font-size: 0.9em;
}
.pdf-page-separator { color: var(--color-muted); }
.pdf-total-pages { color: var(--color-muted); }

.pdf-download-icon { margin-left: 0.5rem; }

.pdf-toolbar-separator { width: 1px; height: 24px; background: #ddd; margin: 0 0.5rem; }

.pdf-canvas-container {
  overflow: auto; background: white;
  display: flex; justify-content: center;
  padding: 1rem 0; position: relative;
}
.pdf-canvas { background: white; max-width: 100vw; }

/* Tap zones for page navigation */
.pdf-tap-zone {
  position: absolute; top: 0; bottom: 0; width: 15%; min-width: 44px; max-width: 80px;
  background: transparent; border: none; cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease, background 0.2s ease;
}
.pdf-tap-zone:hover, .pdf-tap-zone:focus { opacity: 1; background: rgba(0,0,0,0.05); outline: none; }
.pdf-tap-zone:active { background: rgba(0,0,0,0.1); }
.pdf-tap-zone-left { left: 0; }
.pdf-tap-zone-right { right: 0; }
.pdf-tap-zone-icon { color: var(--color-text); opacity: 0.6; pointer-events: none; }

@media (hover: none) and (pointer: coarse) {
  .pdf-tap-zone { opacity: 0.3; }
  .pdf-tap-zone:active { opacity: 1; }
}

.issue-download { margin: 2rem 0; }
.download-btn {
  background: var(--color-link);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
}
.download-btn:hover { background: var(--color-link-hover); color: white; }

/* ── Issues archive page ─────────────────────────────── */

.year-group { margin-bottom: 2rem; }
.issues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 1rem;
}
.issue-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-link);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.issue-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(189, 145, 42, 0.25);
  border-color: var(--color-link-hover);
}
.issue-brand {
  font-size: 1em;
  font-weight: 400;
  color: #000;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}
.issue-number {
  font-size: 2.8em;
  font-weight: 400;
  line-height: 1;
  color: var(--color-link);
}

/* ── Home page ───────────────────────────────────────── */

.home { max-width: 44rem; }
.home-title {
  font-size: 2em; font-weight: 400;
  margin-top: 2.5rem; margin-bottom: 1.5rem;
}

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

.search { max-width: 800px; margin: 0; }

.search-header h1 { margin: 1rem 0; }
.subtitle { font-size: 1.1em; color: #666; margin: 0; }

.search-form {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.search-input-wrap { position: relative; flex: 1; display: flex; min-width: 0; }

.search-input {
  flex: 1;
  min-width: 0;
  padding: 1rem 1.5rem;
  font-family: var(--font-main);
  font-size: 1.25em;
  border: 2px solid var(--color-primary);
  border-radius: 8px;
  outline: none;
}
.search-input:focus { box-shadow: 0 0 0 3px rgba(0,51,102,0.2); }
/* Hide the browser's native type="search" clear icon — we render our own
   .search-clear button so it doesn't double up with the native one. */
.search-input::-webkit-search-cancel-button { display: none; -webkit-appearance: none; }

.search-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.75rem;
  height: 1.75rem;
  line-height: 1;
  font-size: 1.25em;
  color: var(--color-muted);
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.search-clear:hover { background: rgba(0,0,0,0.06); color: var(--color-text); }

.search-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tab-group-right { margin-left: auto; }

.tab-buttons {
  display: flex;
  gap: 0;
  padding: 2px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f3f4f6;
}

.tab-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #6b7280;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 400;
  text-align: center;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}
.tab-button:hover { color: #374151; text-decoration: none; }
.tab-button.active {
  background: #ffffff;
  color: #111827;
  font-weight: 500;
}

.tab-count { opacity: 0.7; font-size: 10px; }

.search-loading { color: var(--color-muted); padding: 1rem 0; }

.search-submit {
  padding: 0 1.75rem;
  font-family: var(--font-main);
  font-size: 1.1em;
  font-weight: 500;
  color: white;
  background: var(--color-link);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.search-submit:hover { background: var(--color-link-hover); }

.search-results { list-style: none; padding: 1.5rem; margin: 0; background: white; border-radius: 8px; }
.search-empty { color: var(--color-muted); text-align: center; padding: 2rem; }

.search-load-more { display: flex; justify-content: center; margin-top: 1.5rem; }
.search-load-more-btn {
  padding: 0.6rem 1.75rem;
  font-family: var(--font-main);
  font-size: 0.95em;
  font-weight: 500;
  color: var(--color-link);
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.search-load-more-btn:hover { background: rgba(201, 169, 97, 0.15); text-decoration: none; }

.search-result { padding: 1rem 0; border-bottom: 1px solid #eee; }
.search-result:last-child { border-bottom: none; }
.search-result-title { display: block; color: var(--color-link); font-size: 1.2em; font-weight: 500; margin-bottom: 0.3rem; }
.search-result-title:hover { color: var(--color-link-hover); text-decoration: underline; }
.search-result-excerpt { font-size: 0.9em; color: var(--color-text); line-height: 1.6; margin-top: 0.25rem; }
.search-result-excerpt mark { background: var(--color-secondary); padding: 0 2px; }

/* ── Default/page template ───────────────────────────── */

.page { max-width: 44rem; padding: 0; }
.page h1 { font-size: 2em; font-weight: 400; margin-top: 2.5rem; margin-bottom: 1.5rem; }
.page h2 { font-size: 1.5rem; font-weight: 400; margin: 1.5rem 0 0.5rem; }
.page h3 { font-size: 1.2rem; font-weight: 600; margin: 1rem 0 0.4rem; }
.page p { margin-bottom: 1rem; line-height: 1.7; }
.page ul, .page ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.page li { margin-bottom: 0.4rem; line-height: 1.6; }

/* ── Link page ───────────────────────────────────────── */

.link-page { max-width: 44rem; }
.link-title { font-size: 1.6rem; font-weight: 400; margin-bottom: 0.35rem; }
.link-date { font-size: 0.85rem; color: var(--color-muted); }
.link-header { margin-bottom: 1.25rem; }
.link-url { margin: 1.25rem 0; }
.link-url .button { word-break: break-all; }
.link-tags { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ── Footer ──────────────────────────────────────────── */

.site-footer {
  margin-top: 4rem;
  padding-top: 2rem; padding-bottom: 2rem;
  border-top: 2px solid var(--color-secondary);
  background: linear-gradient(to bottom, var(--color-sidebar-bg) 0%, white 100%);
  text-align: center;
}

.site-footer-links {
  display: flex; flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem; margin-bottom: 1.5rem;
}
.site-footer-links-break { width: 100%; height: 0; }
.site-footer-links a { color: var(--color-link); text-decoration: none; font-weight: 500; }
.site-footer-links a:hover { color: var(--color-link-hover); text-decoration: underline; }

.site-footer p { font-size: 0.85em; color: var(--color-muted); margin-bottom: 0.5rem; }
.site-footer a { color: var(--color-link); }

.privacy-badge {
  display: inline-flex; align-items: center; gap: 0.75rem;
  margin-top: 1.5rem;
  text-decoration: none; color: var(--color-text);
  font-size: 0.8em;
}
.privacy-badge:hover { text-decoration: none; opacity: 0.85; }
.privacy-badge img { width: 80px; height: auto; flex-shrink: 0; }
.privacy-badge span { text-align: left; line-height: 1.6; }

/* ── Landing page (home) — mirrors live site landing.css ─ */

.hero-headline {
  font-size: 1.0em !important;
  font-family: inherit !important;
  font-weight: bold !important;
  color: inherit !important;
  margin: 0 0 0.5rem 0 !important;
  line-height: 1.7 !important;
}
.hero-subheadline {
  font-size: 1.0em !important;
  font-family: inherit !important;
  font-weight: normal !important;
  color: inherit !important;
  margin: 0 0 1rem 0 !important;
  line-height: 1.7 !important;
}

.landing-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.landing-current-focus {
  margin: 3rem auto;
  padding: 2rem;
  background-color: #fffbf0;
  border-left: 4px solid var(--color-secondary);
  border-radius: 8px;
  font-size: 12px;
}
.landing-current-focus h2 {
  color: var(--color-primary);
  font-size: 1.6em;
  margin-top: 0;
  margin-bottom: 1rem;
}
.landing-current-focus p { margin-bottom: 1rem; line-height: 1.7; }
.landing-current-focus a { color: var(--color-link); text-decoration: none; font-weight: 500; }
.landing-current-focus a:hover { color: var(--color-link-hover); }

.landing-quote {
  margin: 1rem;
  padding: 1rem;
  font-size: 12px;
}
.landing-quote h3 { font-style: italic; margin-left: 1rem; margin-bottom: 1rem; }
.landing-quote h4 { color: var(--color-primary); margin-bottom: 1rem; }

.landing-archive-highlight {
  max-width: 900px;
  margin: 4rem auto;
  padding: 3rem 2rem;
  background-color: var(--color-sidebar-bg);
  border-radius: 8px;
  text-align: center;
  font-size: 12px;
}
.landing-archive-highlight .search-container,
.landing-archive-highlight .search-results { text-align: left; }
.landing-archive-highlight h2 { color: var(--color-primary); font-size: 2em; margin-bottom: 1rem; }
.landing-archive-stats {
  font-size: 1.3em;
  color: var(--color-text);
  margin-bottom: 2rem;
}
.landing-archive-stats strong { color: var(--color-primary); font-weight: 600; }
.landing-archive-highlight p { margin-bottom: 2rem; line-height: 1.7; }

.landing-engagement {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
  font-size: 12px;
}
.landing-engagement h2 {
  color: var(--color-primary);
  font-size: 2em;
  margin-bottom: 3rem;
  text-align: center;
}
.landing-engagement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.landing-engagement-tier {
  padding: 2rem;
  background-color: white;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  text-align: center;
  transition: all 0.2s;
}
.landing-engagement-tier:hover {
  border-color: var(--color-link-hover);
  box-shadow: 0 4px 12px rgba(189, 145, 42, 0.2);
}
.landing-engagement-tier h3 { color: var(--color-primary); font-size: 1.5em; margin-bottom: 1rem; }
.landing-engagement-tier p { line-height: 1.7; margin-bottom: 1rem; }
.landing-engagement-tier ul { list-style: none; padding: 0; margin: 1.5rem 0; }
.landing-engagement-tier li { margin-bottom: 0.5rem; line-height: 1.6; }

/* Landing section container-query font scaling (own scale, separate from content-page) */
@container content (min-width: 400px) {
  .landing-current-focus,
  .landing-quote,
  .landing-archive-highlight,
  .landing-engagement { font-size: 13px; }
}
@container content (min-width: 600px) {
  .landing-current-focus,
  .landing-quote,
  .landing-archive-highlight,
  .landing-engagement { font-size: 15px; }
}
@container content (min-width: 800px) {
  .landing-current-focus,
  .landing-quote,
  .landing-archive-highlight,
  .landing-engagement { font-size: 17px; }
}
@container content (min-width: 1000px) {
  .landing-current-focus,
  .landing-quote,
  .landing-archive-highlight,
  .landing-engagement { font-size: 19px; }
}
@container content (min-width: 1200px) {
  .landing-current-focus,
  .landing-quote,
  .landing-archive-highlight,
  .landing-engagement { font-size: 21px; }
}

@media (max-width: 600px) {
  .landing-engagement-grid { grid-template-columns: 1fr; }
}

/* Downloadable files attached to an article (recovered from the old CMS) */
.attachments { list-style: none; margin: 2rem 0 0; padding: 0; font-size: 0.9em; }
.attachments li { margin: 0.25rem 0; }
