/* ============================================================
   Spandanam Library — സ്പന്ദനം ഗ്രന്ഥശാല, എടവണ്ണപ്പാറ
   Design language: the library's blues, rounded Malayalam
   letterforms (Baloo Chettan 2) and the "spandanam" pulse line.
   ============================================================ */

:root {
  --bg: #f5fafe;
  --surface: #ffffff;
  --surface-2: #e9f3fb;
  --ink: #0e2a4a;
  --muted: #47688c;
  --primary: #0c58ae;
  --primary-ink: #ffffff;
  --sky: #78c0f0;
  --pale: #d5eafa;
  --line: #cfe3f3;
  --deep: #0a2e5c;
  --shadow: 0 2px 10px rgba(10, 46, 92, 0.07), 0 12px 32px rgba(10, 46, 92, 0.06);
  --radius: 14px;
  --font-display: "Manjari", "Noto Sans Malayalam", "Meera", sans-serif;
  --font-body: "Manjari", "Noto Sans Malayalam", "Meera", sans-serif;
}

[data-theme="dark"] {
  --bg: #071320;
  --surface: #0d2033;
  --surface-2: #122a44;
  --ink: #e8f2fc;
  --muted: #9cbad8;
  --primary: #78c0f0;
  --primary-ink: #06121d;
  --sky: #78c0f0;
  --pale: #133455;
  --line: #1d3c5d;
  --deep: #a8d8f0;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.28);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.06rem;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
p { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1080px; margin-inline: auto; padding-inline: 1.25rem; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--primary); color: var(--primary-ink);
  padding: 0.6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  padding: 0.55rem 1.5rem 0.45rem;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-ghost { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-light { background: #ffffff; color: #0a2e5c; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 0.75rem;
  min-height: 64px;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 40px; width: auto; }
.brand-logo-dark, [data-theme="dark"] .brand-logo-light { display: none; }
[data-theme="dark"] .brand-logo-dark { display: block; }

.site-nav {
  display: flex; align-items: center; gap: 0.1rem;
  margin-inline-start: auto;
  font-family: var(--font-display);
  font-weight: 500;
}
.site-nav a {
  color: var(--ink);
  padding: 0.45rem 0.6rem 0.35rem;
  border-radius: 8px;
  font-size: 0.96rem;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--surface-2); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--primary); box-shadow: inset 0 -2.5px 0 var(--primary); border-radius: 8px 8px 0 0; }
.site-nav .nav-cta {
  background: var(--primary); color: var(--primary-ink);
  border-radius: 999px; padding-inline: 1rem; margin-inline-start: 0.35rem;
}
.site-nav .nav-cta:hover { background: var(--deep); color: var(--bg); }
[data-theme="dark"] .site-nav .nav-cta:hover { background: #a8d8f0; color: #06121d; }

.header-tools { display: flex; align-items: center; gap: 0.4rem; }
.lang-switch {
  font-family: var(--font-display); font-weight: 600; font-size: 0.92rem;
  color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 0.3rem 0.85rem 0.2rem;
  white-space: nowrap;
}
.lang-switch:hover { border-color: var(--sky); text-decoration: none; background: var(--surface-2); }
.theme-toggle, .search-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px;
  border: 1.5px solid var(--line); background: transparent; color: var(--ink);
  cursor: pointer;
}
.theme-toggle:hover, .search-link:hover { border-color: var(--sky); background: var(--surface-2); }
.icon-moon, [data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.nav-toggle { display: none; }

@media (max-width: 1023px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 38px; padding: 0 9px;
    background: transparent; border: 1.5px solid var(--line); border-radius: 10px;
    cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.15rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 1.25rem 1rem;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.7rem 0.8rem 0.6rem; font-size: 1.08rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--primary); border-radius: 8px; }
  .site-nav .nav-cta { text-align: center; margin: 0.5rem 0 0; }
}

/* ---------- Pulse motif ---------- */
.pulse-divider, .pulse-hero {
  display: block; width: min(420px, 80%); height: 34px;
  color: var(--sky);
  margin: 0.75rem 0 0.5rem;
}
.pulse-hero { width: min(560px, 92%); height: 44px; margin: 0.5rem auto 1rem; color: var(--primary); }
[data-theme="dark"] .pulse-hero { color: var(--sky); }
.pulse-hero .pulse-path {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: pulse-draw 2.2s ease-out 0.2s forwards;
}
@keyframes pulse-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .pulse-hero .pulse-path { animation: none; stroke-dashoffset: 0; }
  html { scroll-behavior: auto; }
  .btn:hover, .card:hover, .book-card:hover { transform: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 4rem 0 2.5rem;
}
.hero-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-logo { width: min(360px, 74vw); height: auto; }
.hero-logo-dark, [data-theme="dark"] .hero-logo-light { display: none; }
[data-theme="dark"] .hero-logo-dark { display: block; }
.hero-tagline {
  font-size: clamp(1.6rem, 4.2vw, 2.5rem);
  margin: 0.25rem 0 0.25rem;
  letter-spacing: 0.01em;
}
.hero-sub { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.25rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }

/* ---------- Today's special day banner ---------- */
.today-special { padding: 1.5rem 0 0; }
.today-banner {
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-inline-start: 5px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
}
.today-banner .today-label {
  font-family: var(--font-display); font-weight: 700;
  background: var(--primary); color: var(--primary-ink);
  border-radius: 999px; padding: 0.3rem 1.1rem 0.2rem;
  white-space: nowrap;
}
.today-banner h2 { margin: 0; font-size: 1.35rem; }
.today-banner p { margin: 0; color: var(--muted); }
.today-banner .today-text { flex: 1; min-width: 240px; }

/* ---------- Quote band ---------- */
.quote-band { padding: 4rem 0 3.5rem; }
.quote {
  margin: 0 auto;
  max-width: 44rem;
  text-align: center;
  position: relative;
  padding-top: 2.75rem;
}
/* big faint quotation mark sitting behind the words */
.quote-mark {
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 700;
  font-size: 7rem; line-height: 1;
  color: var(--sky); opacity: 0.16;
  z-index: 0; user-select: none; pointer-events: none;
}
.quote blockquote {
  position: relative; z-index: 1;
  margin: 0;
  /* Chilanka: a Malayalam handwriting font (self-hosted) for a personal,
     hand-written feel; falls back to Manjari if it hasn't loaded yet */
  font-family: "Chilanka", var(--font-display);
  font-weight: 400;
  font-size: clamp(1.45rem, 3.6vw, 2.25rem);
  line-height: 1.75;
  color: var(--ink);
  text-wrap: balance;
}
.quote-author {
  margin-top: 1.4rem;
  color: var(--primary);
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.92rem; letter-spacing: 0.08em; text-transform: uppercase;
}
/* small accent rule above the author */
.quote-author::before {
  content: ""; display: block;
  width: 34px; height: 2px; border-radius: 2px;
  background: var(--sky);
  margin: 0 auto 0.9rem;
}

.quotes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; padding-bottom: 3rem; }
.quote-card-list blockquote { font-size: 1.12rem; }

/* ---------- Sections ---------- */
.section { padding: 3rem 0; }
.section-alt { background: var(--surface-2); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-echo {
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--primary); margin: 0 0 0.1rem;
}
.section-title { font-size: clamp(1.45rem, 3.2vw, 1.9rem); margin: 0; }
.section-link { font-family: var(--font-display); font-weight: 600; white-space: nowrap; padding-bottom: 0.2rem; }
@media (max-width: 560px) {
  .section-head { flex-wrap: wrap; align-items: baseline; }
}

/* ---------- Special days ---------- */
.day-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem 0.9rem;
}
.day-card.day-past { opacity: 0.62; }
.day-date { display: flex; align-items: baseline; gap: 0.4rem; margin-bottom: 0.35rem; color: var(--primary); font-family: var(--font-display); }
.day-num { font-size: 1.7rem; font-weight: 700; line-height: 1; }
.day-month { font-weight: 600; font-size: 0.95rem; }
.day-name { font-size: 1.12rem; margin-bottom: 0.25rem; }
.day-desc { color: var(--muted); font-size: 0.95rem; margin: 0; line-height: 1.7; }
.days-list { display: grid; gap: 1rem; padding-bottom: 3rem; }
.day-card-row { display: flex; gap: 1.25rem; align-items: flex-start; }
.day-card-row .day-date { flex-direction: column; align-items: center; gap: 0; min-width: 64px; }
.day-card-row .day-name { font-size: 1.2rem; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { text-decoration: none; transform: translateY(-4px); }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 0.3rem; padding: 1.1rem 1.25rem 1.2rem; }
.card-date { color: var(--primary); font-family: var(--font-display); font-weight: 600; font-size: 0.88rem; }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: 1.16rem; line-height: 1.5; }
.card-text { color: var(--muted); font-size: 0.97rem; line-height: 1.7; }
.card-author { color: var(--muted); font-size: 0.9rem; }
.card-badge {
  align-self: flex-start;
  font-family: var(--font-display); font-weight: 600; font-size: 0.8rem;
  background: var(--pale); color: var(--primary);
  border-radius: 999px; padding: 0.15rem 0.75rem 0.05rem;
  margin-bottom: 0.25rem;
}

/* Excellence */
.excellence-card { padding: 1.2rem 1.3rem; gap: 0.6rem; }
.excellence-top { display: flex; gap: 0.9rem; align-items: center; }
.excellence-photo {
  width: 56px; height: 56px; border-radius: 999px; object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--sky);
}
.excellence-photo-gen {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--pale); color: var(--primary); font-size: 1.5rem;
}
.excellence-member { display: block; color: var(--muted); font-size: 0.92rem; }

/* ---------- Books ---------- */
.book-shelf {
  display: grid; grid-auto-flow: column; grid-auto-columns: 168px;
  gap: 1.1rem; overflow-x: auto; padding: 0.25rem 0.25rem 0.75rem;
  scroll-snap-type: x proximity;
}

/* Auto-scrolling marquee (homepage trending shelf) */
.book-marquee {
  overflow: hidden;
  padding: 0.5rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
}
.book-track {
  display: flex; gap: 1.1rem; width: max-content;
  transition: transform 1s cubic-bezier(0.45, 0.05, 0.2, 1);
  will-change: transform;
}
.book-track .book-card { flex: 0 0 168px; width: 168px; }
@media (prefers-reduced-motion: reduce) {
  .book-track { transition: none; width: auto; transform: none !important; }
  .book-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}
.book-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.25rem; margin-bottom: 2.5rem;
}
.book-card { display: flex; flex-direction: column; gap: 0.5rem; color: var(--ink); scroll-snap-align: start; transition: transform 0.18s ease; }
.book-card:hover { text-decoration: none; transform: translateY(-4px); }
.book-cover {
  display: flex; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow); background: var(--surface-2);
  border: 1px solid var(--line);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover-gen {
  padding: 0;
  background: #0f3763;
  border: none;
  position: relative;
  overflow: hidden;
}
/* spine */
.book-cover-gen::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0;
  width: 6px; background: rgba(0, 0, 0, 0.25);
}
.gen-inner {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  height: 100%; width: 100%;
  padding: 1.1rem 0.85rem 0.9rem 1.05rem;
  border: 1px solid rgba(168, 216, 240, 0.28);
  border-inline-start: none;
}
.gen-mark { width: 30px; height: 30px; color: #a8d8f0; margin-bottom: 0.6rem; flex-shrink: 0; }
.gen-title {
  font-family: var(--font-display); font-weight: 700; color: #ffffff;
  font-size: 1rem; line-height: 1.45;
  display: flex; align-items: center; flex: 1;
}
.gen-author { color: #a8d8f0; font-size: 0.8rem; margin-top: 0.35rem; }
.gen-brand {
  font-family: var(--font-display); color: rgba(168, 216, 240, 0.7);
  font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase;
  margin-top: 0.55rem; padding-top: 0.45rem;
  border-top: 1px solid rgba(168, 216, 240, 0.22); width: 60%;
}
.book-cover-large { max-width: 280px; }
.book-cover-large .gen-inner { padding: 1.6rem 1.2rem 1.3rem 1.4rem; }
.book-cover-large .gen-mark { width: 40px; height: 40px; }
.book-cover-large .gen-title { font-size: 1.35rem; }
.book-cover-large .gen-author { font-size: 0.95rem; }
.book-meta { display: flex; flex-direction: column; }
.book-title { font-family: var(--font-display); font-weight: 600; font-size: 0.99rem; line-height: 1.5; }
.book-author { color: var(--muted); font-size: 0.87rem; }
.shelf-title { font-size: 1.35rem; margin: 2rem 0 1rem; }
.catalogue-note { color: var(--muted); font-size: 0.95rem; margin-top: 1rem; }
.catalogue-teaser {
  background: var(--surface-2); border: 1px dashed var(--sky);
  border-radius: var(--radius); padding: 1.5rem 1.75rem; margin: 1rem 0 3rem;
}
.catalogue-teaser h2 { font-size: 1.2rem; }
.catalogue-teaser p { margin: 0 0 1rem; color: var(--muted); }
.catalogue-teaser .btn { margin: 0; }

/* Book detail */
.book-detail { padding: 3rem 0; }
.book-detail-grid { display: grid; grid-template-columns: 260px 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 720px) { .book-detail-grid { grid-template-columns: 1fr; } .book-detail-cover { max-width: 240px; } }
.book-detail-cover img { border-radius: 8px; box-shadow: var(--shadow); }
.book-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1.25rem; margin: 1.25rem 0; }
.book-facts dt { font-family: var(--font-display); font-weight: 600; color: var(--muted); }
.book-facts dd { margin: 0; }
.badge {
  display: inline-block; font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  border-radius: 999px; padding: 0.25rem 0.9rem 0.15rem;
}
.badge-upcoming { background: var(--pale); color: var(--primary); }

/* ---------- Page & prose ---------- */
.page { padding-bottom: 2rem; }
.page-head { padding: 3rem 1.25rem 1rem; }
.page-head h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
.page-lede { color: var(--muted); font-size: 1.15rem; margin: 0.25rem 0 0.5rem; }
.page-date { color: var(--muted); font-size: 0.98rem; margin: 0 0 0.25rem; }
.crumb { margin-bottom: 0.75rem; font-family: var(--font-display); font-weight: 600; font-size: 0.92rem; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 2rem; font-size: 1.5rem; }
.prose h3 { margin-top: 1.5rem; font-size: 1.2rem; }
.prose ul, .prose ol { padding-inline-start: 1.5rem; line-height: 1.9; }
.prose img { border-radius: var(--radius); box-shadow: var(--shadow); }
.prose blockquote {
  margin: 1.5rem 0; padding: 0.75rem 1.5rem;
  border-inline-start: 4px solid var(--sky);
  background: var(--surface-2); border-radius: 0 var(--radius) var(--radius) 0;
}
.article-cover { border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.5rem; width: 100%; object-fit: cover; max-height: 460px; }
.article-cover-portrait { max-width: 420px; }
.empty-note { color: var(--muted); padding: 2rem 0 3rem; }

/* ---------- Team ---------- */
.team-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem; padding-bottom: 3rem; margin-top: 1rem;
}
.team-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem 1.5rem 1.4rem; text-align: center; box-shadow: var(--shadow);
}
.team-photo {
  width: 96px; height: 96px; border-radius: 999px; object-fit: cover;
  margin: 0 auto 0.9rem; border: 3px solid var(--sky);
}
.team-photo-gen { display: flex; align-items: center; justify-content: center; background: var(--pale); color: var(--primary); }
.team-name { font-size: 1.15rem; margin-bottom: 0.1rem; }
.team-role { color: var(--primary); font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; margin-bottom: 0.5rem; }
.team-bio { color: var(--muted); font-size: 0.92rem; line-height: 1.7; margin: 0; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.9rem; padding-bottom: 3rem; }
.gallery-item { border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.gallery-item:hover img { transform: scale(1.04); }

/* ---------- Membership form ---------- */
.membership-form { padding-bottom: 3rem; }
.form-open-link { margin-bottom: 1.5rem; }
.form-embed { margin-top: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.form-embed iframe { width: 100%; min-height: 900px; border: 0; display: block; }

/* ---------- Search ---------- */
.search-wrap { max-width: 720px; padding-bottom: 4rem; }
.search-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 1.2rem 0.7rem;
}
.search-input:focus { outline: none; border-color: var(--primary); }
.search-hint { color: var(--muted); font-size: 0.95rem; margin: 0.75rem 0.25rem; }
.search-results { display: grid; gap: 0.9rem; margin-top: 1.25rem; }
.search-result {
  display: flex; flex-direction: column; gap: 0.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 0.9rem;
  color: var(--ink);
}
.search-result:hover { text-decoration: none; border-color: var(--sky); box-shadow: var(--shadow); }
.search-kind {
  align-self: flex-start;
  font-family: var(--font-display); font-weight: 600; font-size: 0.78rem;
  background: var(--pale); color: var(--primary);
  border-radius: 999px; padding: 0.1rem 0.7rem 0;
  margin-bottom: 0.2rem;
}
.search-title { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; }
.search-snippet { color: var(--muted); font-size: 0.95rem; line-height: 1.7; }
.search-none { color: var(--muted); padding: 1rem 0.25rem; }

/* ---------- Catalogue ---------- */
.catalogue-wrap { padding-bottom: 4rem; }
.catalogue-controls { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.5rem; }
.catalogue-controls .search-input { flex: 1 1 260px; }
.catalogue-filters { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.catalogue-select {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem 2.1rem 0.5rem 1rem;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2347688c' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1rem;
}
.catalogue-select:focus { outline: none; border-color: var(--primary); }
.catalogue-count { color: var(--muted); font-size: 0.92rem; margin: 1.1rem 0.25rem 0.75rem; }
.catalogue-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5rem 1.25rem;
}
.catalogue-card { cursor: default; }
.catalogue-card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.15rem; }
.catalogue-card-tags .tag { font-size: 0.78rem; padding: 0.1rem 0.6rem 0; }
.catalogue-price { color: var(--muted); font-family: var(--font-display); font-weight: 600; font-size: 0.85rem; align-self: center; }
.catalogue-status { grid-column: 1 / -1; color: var(--muted); padding: 2rem 0.25rem; text-align: center; }

/* ---------- Tags ---------- */
.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 1rem 1.25rem 2rem; color: var(--muted); }
.tag {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.2rem 0.9rem 0.1rem; font-family: var(--font-display); font-weight: 600; font-size: 0.9rem;
}
.tag:hover { border-color: var(--sky); text-decoration: none; }
.tag-count { color: var(--muted); font-size: 0.8rem; }
.tag-cloud { padding-bottom: 4rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: #0a2e5c;
  color: #ffffff;
  padding: 3.5rem 0;
  text-align: center;
}
.cta-inner { display: flex; flex-direction: column; align-items: center; }
.cta-pulse { color: #78c0f0; margin-bottom: 1rem; }
.cta-band h2 { color: #ffffff; font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
.cta-band p { color: #cfe6f8; max-width: 560px; margin-bottom: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: #071320; color: #cfe0f0; }
[data-theme="dark"] .site-footer { background: #050e18; border-top: 1px solid var(--line); }
.footer-grid {
  display: grid; grid-template-columns: 1.2fr 1fr 0.7fr 1.1fr; gap: 2.25rem;
  padding-block: 3rem 2rem;
}
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; } }
.footer-map iframe {
  width: 100%; height: 220px; border: 0;
  border-radius: 12px; display: block;
  border: 1px solid #12283f;
}
.footer-logo { width: 170px; margin-bottom: 0.75rem; }
.footer-note { color: #9cbad8; margin-bottom: 0.25rem; }
.footer-place { color: #7d9cbd; font-size: 0.95rem; }
.site-footer h3 {
  color: #a8d8f0; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.14em;
  margin: 0 0 0.6rem;
}
.site-footer h3 + p, .site-footer p { margin-bottom: 0.4rem; font-size: 0.98rem; }
.site-footer h3:not(:first-child) { margin-top: 1.25rem; }
.site-footer a { color: #cfe0f0; }
.site-footer a:hover { color: #ffffff; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.footer-socials { display: flex; gap: 0.6rem; margin-top: 1rem; }
.footer-socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px;
  border: 1.5px solid #1d3c5d; color: #a8d8f0;
}
.footer-socials a:hover { border-color: #78c0f0; color: #ffffff; }
.footer-bottom {
  border-top: 1px solid #12283f; padding-block: 1.1rem;
  font-size: 0.88rem; color: #7d9cbd;
}
.footer-bottom p { margin: 0; }
