/* ============================================
   Exploring the North — combined design
   Emerald / sky / amber palette, Playfair Display + Inter
   ============================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  color: #111827;
  background: #eef5f2;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: "Playfair Display", Georgia, serif; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.container { max-width: 80rem; margin: 0 auto; padding: 0 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; background: #065f46;
  color: #fff; padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid #38bdf8; outline-offset: 2px;
}

/* ============ Navigation ============ */
.site-nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.site-nav.scrolled { background: rgba(255,255,255,0.98); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07); }
.site-nav .container { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.site-nav.scrolled .container { height: 72px; }

.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand-mark { font-family: "Playfair Display", Georgia, serif; font-size: 1.7rem; font-weight: 700; color: #065f46; letter-spacing: -0.01em; }
.brand-mark em { font-style: normal; color: #0284c7; }
.brand-tag { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: #9ca3af; font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 28px; font-size: 0.92rem; }
.nav-link {
  position: relative; font-weight: 500; color: #111827; padding: 6px 0;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
  background: #047857; transition: width 0.2s ease;
}
.nav-link:hover { color: #047857; }
.nav-link:hover::after { width: 100%; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: #047857; color: #fff; font-weight: 600; font-size: 0.92rem;
  padding: 0 22px; height: 44px; border-radius: 999px; border: none; cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07); transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn-primary:hover { background: #065f46; transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: #047857; font-weight: 600; font-size: 0.92rem;
  padding: 0 20px; height: 44px; border-radius: 999px; border: 1.5px solid #047857;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn-secondary:hover { background: #ecfdf5; transform: translateY(-1px); }

.nav-toggle {
  display: none; background: none; border: none; font-size: 1.4rem; color: #111827; cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* ============ Hero ============ */
.hero {
  position: relative; overflow: hidden; min-height: 38vh;
  display: flex; align-items: center; isolation: isolate;
}
@media (max-height: 700px) { .hero { min-height: 32vh; } }
.hero-carousel { position: absolute; inset: 0; z-index: -2; }
.carousel-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.6s ease-in-out;
}
.carousel-img.active { opacity: 1; }

.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(6,20,15,0.68) 0%, rgba(6,20,15,0.45) 40%, rgba(6,20,15,0.8) 100%);
}

.hero-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 20;
  width: 52px; height: 52px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.3); backdrop-filter: blur(8px); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.hero-nav-btn:hover { background: rgba(0,0,0,0.5); transform: translateY(-50%) scale(1.08); }
.hero-nav-btn.prev { left: 20px; }
.hero-nav-btn.next { right: 20px; }
@media (max-width: 640px) { .hero-nav-btn { display: none; } }

.hero-inner { position: relative; z-index: 5; width: 100%; padding: 76px 0 36px; text-align: center; }
.hero-coords {
  font-family: ui-monospace, monospace; font-size: 0.78rem; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.85); margin-bottom: 18px; text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0,0,0,0.55);
}

.hero h1 {
  font-size: clamp(1.9rem, 4.4vw, 2.9rem); color: #fff; font-weight: 700; line-height: 1.12;
  text-shadow: 0 2px 14px rgba(0,0,0,0.55); max-width: 720px; margin: 0 auto 14px;
}
.hero h1 em { font-style: normal; color: #d1fae5; }

.lede {
  max-width: 580px; margin: 0 auto 22px; font-size: 1rem; color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.hero-search {
  max-width: 460px; margin: 0 auto; background: rgba(255,255,255,0.96);
  border-radius: 999px; padding: 4px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.12), 0 10px 10px -5px rgba(0,0,0,0.04);
  display: flex; align-items: center; gap: 4px;
}
.hero-search-input {
  flex: 1; border: none; background: transparent; outline: none;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.94rem; color: #111827; padding: 10px 14px;
}
.hero-search-input::placeholder { color: #9ca3af; }
.hero-search-btn {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 999px; border: none;
  background: #047857; color: #fff; cursor: pointer; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.2s ease;
}
.hero-search-btn:hover { background: #065f46; }

.hero-contour { position: absolute; bottom: 0; left: 0; width: 100%; height: 80px; color: #eef5f2; z-index: 6; pointer-events: none; }

/* ============ Sections ============ */
.section { padding: 88px 0; }
.section--tight-top { padding-top: 40px; }
.section-head { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: #047857; margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); color: #111827; margin-bottom: 12px; }
.section-head p { color: #6b7280; font-size: 1.02rem; }

/* ============ Waypoint grid ============ */
/* Flexbox, not grid: justify-content:center automatically centers an
   incomplete trailing row for ANY card count (5 -> 3+2, 8 -> 3+3+2,
   10 -> 3+3+3+1, etc.) with no per-count rules needed. */
.waypoint-grid {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 22px;
}
.waypoint-card {
  flex: 0 0 calc((100% - 2 * 22px) / 3); /* 3 per row on desktop */
  max-width: calc((100% - 2 * 22px) / 3);
}

@media (max-width: 900px) {
  .waypoint-card {
    flex-basis: calc((100% - 22px) / 2); /* 2 per row */
    max-width: calc((100% - 22px) / 2);
  }
}
@media (max-width: 560px) {
  .waypoint-card { flex-basis: 100%; max-width: 100%; } /* 1 per row */
}

.waypoint-card {
  position: relative; background: #ffffff; border: 1px solid #f3f4f6;
  border-radius: 18px; padding: 28px 24px 24px; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  display: flex; flex-direction: column;
  transition: transform 0.35s cubic-bezier(.165,.84,.44,1), box-shadow 0.35s cubic-bezier(.165,.84,.44,1);
}
.waypoint-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
  background: #059669; transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s cubic-bezier(.165,.84,.44,1); border-radius: 18px 18px 0 0;
}
.waypoint-card.eat::before { background: #f59e0b; }
.waypoint-card.do::before { background: #0284c7; }
.waypoint-card.info::before { background: #34d399; }
.waypoint-card:hover { transform: translateY(-6px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.12), 0 10px 10px -5px rgba(0,0,0,0.04); }
.waypoint-card:hover::before { transform: scaleX(1); }

.waypoint-pin {
  width: 46px; height: 46px; border-radius: 12px; background: #ecfdf5;
  color: #047857; display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; margin-bottom: 14px; transition: transform 0.3s ease;
}
.waypoint-card.eat .waypoint-pin { background: #fef3e2; color: #d97706; }
.waypoint-card.do .waypoint-pin { background: #e0f2fe; color: #0284c7; }
.waypoint-card.info .waypoint-pin { background: #d1fae5; color: #065f46; }
.waypoint-card:hover .waypoint-pin { transform: scale(1.1); }

.waypoint-card h3 {
  font-size: 1.2rem; font-weight: 700; color: #111827; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 2px solid #f3f4f6;
}
.waypoint-card:hover h3 { border-color: #34d399; }
.waypoint-card.eat:hover h3 { border-color: #f59e0b; }
.waypoint-card.do:hover h3 { border-color: #38bdf8; }

.scroll-list { max-height: 320px; overflow-y: auto; padding-right: 4px; margin-bottom: 16px; }
.waypoint-card ul { list-style: none; margin: 0; padding: 0; font-size: 0.92rem; }
.waypoint-card li { border-bottom: 1px solid #f3f4f6; padding: 7px 0; }
.waypoint-card li:last-child { border-bottom: none; }
.waypoint-card li a { color: #374151; transition: color 0.15s ease; }
.waypoint-card li a:hover { color: #047857; text-decoration: underline; }
.waypoint-card li a.featured-link { color: #d97706; font-weight: 600; }

.group-label {
  display: block; font-weight: 700; color: #9ca3af; text-transform: uppercase;
  font-size: 0.66rem; letter-spacing: 0.09em; margin: 16px 0 4px;
}
.group-label:first-child { margin-top: 0; }

.waypoint-view-all {
  display: inline-block; margin-top: auto; font-size: 0.85rem; font-weight: 600;
  color: #047857; padding-top: 12px; border-top: 1px solid #f3f4f6;
}
.waypoint-view-all:hover { text-decoration: underline; }

.blog-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 20px;
}
.blog-post-card {
  display: flex; flex-direction: column; gap: 10px; background: #ffffff;
  border: 1px solid #f3f4f6; border-radius: 14px; padding: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.blog-post-card:hover { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07); transform: translateY(-2px); }
.blog-post-title { font-weight: 700; color: #111827; font-size: 0.98rem; }
.blog-post-read-more { font-size: 0.85rem; font-weight: 600; color: #047857; }

.field-sponsor-name { font-size: 0.8rem; color: rgba(255,255,255,0.55); margin-left: 10px; }

/* ============ Town index ============ */
.town-index {
  background: #ffffff; border: 1px solid #f3f4f6; border-radius: 20px;
  overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.town-index-head {
  background: #111827; color: #fff; padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.town-index-head h2 { font-size: 1.5rem; color: #fff; }
.town-index-head .eyebrow { color: #34d399; }

.town-search { position: relative; width: 100%; max-width: 260px; }
.town-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: 0.85rem; }
.town-search input {
  width: 100%; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px; padding: 10px 14px 10px 36px; color: #fff; font-size: 0.9rem;
}
.town-search input::placeholder { color: rgba(255,255,255,0.5); }
.town-search input:focus { outline: 2px solid #34d399; outline-offset: 1px; }

.route-strip {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 22px 32px; background: #ecfdf5; flex-wrap: wrap;
}
.route-node { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 600; color: #6b7280; }
.route-node.active { color: #065f46; }
.route-node .dot { width: 8px; height: 8px; border-radius: 999px; background: #9ca3af; }
.route-node.active .dot { background: #059669; }
.route-line { width: 34px; height: 1px; background: #e5e7eb; }

.town-index-body { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 32px; }
@media (max-width: 1080px) { .town-index-body { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (max-width: 640px) { .town-index-body { grid-template-columns: 1fr; } }

.town-group h4 {
  font-size: 0.72rem; font-weight: 800; color: #9ca3af; text-transform: uppercase;
  letter-spacing: 0.09em; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #f3f4f6;
}
.town-group ul { list-style: none; margin: 0; padding: 0; }
.town-link {
  display: block; padding: 8px 10px; border-radius: 8px; color: #374151;
  font-size: 0.92rem; transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}
.town-link:hover { background: #ecfdf5; color: #047857; font-weight: 600; padding-left: 14px; }

.town-index-foot { text-align: center; padding: 18px; border-top: 1px solid #f3f4f6; background: #eef5f2; }
.town-index-foot p { font-size: 0.8rem; font-style: italic; color: #6b7280; }

/* ============ Footer ============ */
.site-footer { background: #111827; color: #d1d5db; padding: 64px 0 32px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid #1f2937;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand .brand-mark { color: #fff; font-size: 1.5rem; }
.footer-brand .brand-mark em { color: #38bdf8; }
.footer-brand p { color: #9ca3af; margin-top: 14px; max-width: 380px; font-size: 0.92rem; }

.footer-col h5 {
  color: #fff; font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; margin-bottom: 18px; font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: #9ca3af; font-size: 0.92rem; transition: color 0.2s ease; }
.footer-col a:hover { color: #34d399; }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 14px; padding-top: 24px; font-size: 0.85rem; color: #6b7280;
}
.footer-bottom-links { display: flex; gap: 22px; }
.footer-bottom-links a:hover { color: #fff; }

/* ============ Mobile menu ============ */
.mobile-menu { position: fixed; inset: 0; z-index: 300; visibility: hidden; }
.mobile-menu.active { visibility: visible; }
.mobile-menu-backdrop {
  position: absolute; inset: 0; background: rgba(17,24,39,0.6); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.3s ease;
}
.mobile-menu.active .mobile-menu-backdrop { opacity: 1; }
.mobile-menu-drawer {
  position: absolute; right: 0; top: 0; height: 100%; width: min(320px, 86vw);
  background: #fff; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.12), 0 10px 10px -5px rgba(0,0,0,0.04); padding: 28px 26px;
  transform: translateX(100%); transition: transform 0.3s ease;
}
.mobile-menu.active .mobile-menu-drawer { transform: translateX(0); }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.mobile-menu-close { background: none; border: none; font-size: 1.3rem; color: #6b7280; cursor: pointer; }
.mobile-nav-links { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.mobile-nav-link {
  display: block; padding: 14px 0; font-weight: 600; font-size: 1.05rem; color: #374151;
  border-bottom: 1px solid #f3f4f6;
}
.mobile-nav-link:hover { color: #047857; }
.mobile-menu-cta { padding-top: 14px; margin-top: 6px; border-top: 1px solid #f3f4f6; }
.btn-full { width: 100%; }
.mobile-menu .btn-primary { width: 100%; margin-top: 10px; }

@media (min-width: 861px) { .mobile-menu { display: none; } }

/* ============ Blog index (3-column article listing) ============ */
.blog-index-search {
  max-width: 420px; margin: 0 auto 32px; position: relative;
}
.blog-index-search i {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #9ca3af;
}
.blog-index-search input {
  width: 100%; height: 44px; border: 1px solid #e5e7eb; border-radius: 999px;
  padding: 0 18px 0 42px; font-size: 0.94rem; background: #ffffff;
}
.blog-index-search input:focus { outline: 2px solid #34d399; outline-offset: 1px; }

.blog-index-cards {
  column-count: 3; column-gap: 24px;
}
.blog-index-cards .blog-post-card {
  break-inside: avoid; margin-bottom: 10px; padding: 14px 16px; display: inline-block; width: 100%;
}
.blog-index-cards .blog-post-title { font-size: 0.88rem; }
@media (max-width: 900px) { .blog-index-cards { column-count: 1; } }

/* ============ Article pages (blog/<slug>.html) ============ */
/* .site-nav is position:fixed at 80px tall (72px scrolled), so anything
   at the very top of document flow on an inner page must clear it. */
.breadcrumb-bar {
  margin-top: 84px;
  background: #f4f1ea;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 0;
  font-size: 0.85rem;
  color: #6b7280;
}
.breadcrumb-bar a { color: #047857; text-decoration: none; }
.breadcrumb-bar a:hover { text-decoration: underline; }
.breadcrumb-bar .sep { margin: 0 6px; color: #9ca3af; }
.breadcrumb-bar .current { color: #6b7280; }

.article-page { max-width: 100%; }
.container--narrow { max-width: 46rem; margin: 0 auto; padding: 0 24px; }

.article-header { margin-bottom: 24px; }
.article-header h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); color: #111827; line-height: 1.18; margin: 6px 0 14px; }
.article-meta { font-size: 0.9rem; color: #6b7280; }
.article-meta .article-sep { margin: 0 8px; color: #d1d5db; }

.article-hero-image { margin: 0 0 28px; border-radius: 12px; overflow: hidden; }
.article-hero-image img { width: 100%; height: auto; display: block; }

.content-disclosure {
  display: flex; align-items: center; gap: 8px;
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  font-size: 0.88rem; border-radius: 8px; padding: 10px 14px; margin-bottom: 24px;
}
.content-disclosure i { color: #d97706; }

.article-body { color: #1f2937; font-size: 1.05rem; line-height: 1.75; }
.article-body p { margin-bottom: 1.2em; }
.article-body h2, .article-body h3 { margin: 1.6em 0 0.6em; }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; }
.article-body a { color: #047857; text-decoration: underline; }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0; }
.tag-chip {
  background: #ecfdf5; color: #047857; font-size: 0.8rem; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
}

.article-footer-nav { margin-top: 36px; padding-top: 24px; border-top: 1px solid #e5e7eb; }

/* ============ Knowledgeable category search widget ============ */
/* Used on both Knowledgeable/index.html and individual article pages. */
.knowledgeable-search {
  background: #f4f1ea;
  border-bottom: 1px solid #e5e7eb;
  padding: 20px 0;
}
.knowledgeable-search-form {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.knowledgeable-search-select {
  flex: 1 1 320px; min-width: 220px; height: 44px; padding: 0 14px;
  border: 1.5px solid #d1d5db; border-radius: 8px; background: #fff;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.95rem; color: #111827; cursor: pointer;
}
.knowledgeable-search-btn { flex-shrink: 0; }

.knowledgeable-search-results {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-height: 480px; overflow-y: auto;
}
.knowledgeable-result-card {
  display: flex; flex-direction: column; gap: 4px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 14px 16px; text-decoration: none; color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.knowledgeable-result-card:hover {
  border-color: #047857; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07);
}
.knowledgeable-result-title {
  font-family: "Playfair Display", Georgia, serif; font-weight: 700;
  font-size: 1.05rem; color: #111827;
}
.knowledgeable-result-date { font-size: 0.8rem; color: #6b7280; }
.knowledgeable-result-excerpt { font-size: 0.92rem; color: #374151; line-height: 1.5; }

.knowledgeable-search-empty,
.knowledgeable-search-loading,
.knowledgeable-search-error {
  font-size: 0.92rem; color: #6b7280; padding: 8px 2px;
  grid-column: 1 / -1;
}
.knowledgeable-search-error { color: #b91c1c; }

/* ============ Knowledgeable search modal (article pages) ============ */
/* ~50% of the viewport, centered both horizontally and vertically. */
.knowledgeable-modal-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(17, 24, 39, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.knowledgeable-modal-dialog {
  background: #fff; border-radius: 14px;
  width: 50vw; height: 50vh;
  min-width: 340px; min-height: 320px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.35);
}
@media (max-width: 900px) {
  .knowledgeable-modal-dialog { width: 92vw; height: 80vh; }
}
.knowledgeable-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #e5e7eb; flex-shrink: 0;
}
.knowledgeable-modal-title {
  font-family: "Playfair Display", Georgia, serif; font-weight: 700;
  font-size: 1.15rem; color: #111827;
}
.knowledgeable-modal-close {
  background: none; border: none; font-size: 1.1rem; color: #6b7280;
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.knowledgeable-modal-close:hover { background: #f3f4f6; color: #111827; }
.knowledgeable-modal-dialog .knowledgeable-search-results {
  flex: 1; overflow-y: auto; padding: 16px 20px; margin-top: 0; max-height: none;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
