/* =================================================================
   The Reader's Index — Stylesheet
   Aesthetic: vintage bibliotheca, warm paper, antique copper
   ================================================================= */

/* ---------- Design Tokens ---------- */
:root {
  --coffee: #6B3E2E;
  --coffee-deep: #4E2A1E;
  --copper: #C49A6C;
  --copper-soft: #D9B888;
  --cream: #F9F5EE;
  --cream-deep: #F1E9D9;
  --paper: #FFFFFF;
  --warm-gray: #8A7A6A;
  --warm-gray-deep: #6B5D50;
  --ink: #3A2A20;

  /* category palette */
  --cat-fiction: #C44536;
  --cat-history: #2A6F6F;
  --cat-science: #B68B40;
  --cat-philosophy: #6B4E71;
  --cat-poetry: #A63A3A;
  --cat-other: #3A6B4E;

  --serif-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --serif-deco: "Cormorant Garamond", Georgia, serif;
  --serif-body: "EB Garamond", Georgia, "Times New Roman", serif;

  --shadow-card: 0 1px 2px rgba(74,46,30,.08), 0 6px 18px rgba(74,46,30,.10);
  --shadow-card-hover: 0 4px 10px rgba(74,46,30,.12), 0 18px 40px rgba(74,46,30,.18);
  --shadow-panel: -20px 0 60px rgba(40,24,16,.28);

  --radius: 6px;
  --radius-lg: 12px;
  --header-h: 72px;
  --transition: 0.32s cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(196,154,108,.10), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(107,62,46,.07), transparent 38%),
    radial-gradient(circle at 50% 100%, rgba(196,154,108,.06), transparent 50%);
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--coffee); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
input, select { font-family: inherit; }

/* paper grain overlay */
.paper-grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.42 0 0 0 0 0.24 0 0 0 0 0.18 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =================================================================
   HEADER
   ================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(249,245,238,.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(196,154,108,.4);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  background: rgba(107,62,46,.96);
  border-bottom-color: rgba(196,154,108,.5);
  box-shadow: 0 4px 22px rgba(40,24,16,.18);
}
.header-inner {
  max-width: 1440px; margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; gap: 24px;
}
.brand-link { display: flex; align-items: center; gap: 12px; color: var(--coffee); text-decoration: none; }
.brand-link:hover { text-decoration: none; }
.site-header.scrolled .brand-link,
.site-header.scrolled .header-nav a,
.site-header.scrolled .filter-toggle { color: var(--cream); }
.brand-mark { color: var(--copper); display: flex; transition: color var(--transition); }
.site-header.scrolled .brand-mark { color: var(--copper-soft); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-title {
  font-family: var(--serif-display); font-weight: 700; font-size: 22px;
  letter-spacing: .01em; color: inherit;
}
.brand-motto {
  font-family: var(--serif-deco); font-style: italic; font-size: 12.5px;
  color: var(--warm-gray); letter-spacing: .12em; margin-top: 3px;
}
.site-header.scrolled .brand-motto { color: var(--copper-soft); }

.header-nav { margin-left: auto; display: flex; gap: 26px; align-items: center; }
.header-nav a {
  font-family: var(--serif-display); font-size: 15px; font-weight: 500;
  color: var(--coffee); letter-spacing: .02em; position: relative; padding: 4px 0;
}
.header-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--copper); transition: width var(--transition);
}
.header-nav a:hover::after { width: 100%; }
.header-nav a:hover { text-decoration: none; }

.filter-toggle {
  display: none; align-items: center; gap: 8px;
  background: var(--coffee); color: var(--cream);
  border: 1px solid var(--coffee); border-radius: 999px;
  padding: 9px 18px; font-family: var(--serif-display); font-size: 14px; font-weight: 500;
  transition: background var(--transition), border-color var(--transition);
}
.filter-toggle:hover { background: var(--coffee-deep); }

/* =================================================================
   HERO
   ================================================================= */
.hero {
  position: relative; z-index: 2;
  text-align: center;
  padding: 72px 24px 40px;
  max-width: 820px; margin: 0 auto;
}
.hero-eyebrow {
  font-family: var(--serif-deco); font-style: italic; font-size: 14px;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--copper); margin: 0 0 14px;
}
.hero-title {
  font-family: var(--serif-display); font-weight: 800;
  font-size: clamp(40px, 6vw, 68px); line-height: 1.05;
  margin: 0 0 18px; color: var(--coffee-deep);
  letter-spacing: -.01em;
}
.hero-sub {
  font-family: var(--serif-body); font-size: 18px; line-height: 1.7;
  color: var(--warm-gray-deep); max-width: 620px; margin: 0 auto;
}
.hero-rule { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 30px; }
.rule-line { height: 1px; width: 80px; background: linear-gradient(90deg, transparent, var(--copper), transparent); }
.rule-ornament { color: var(--copper); font-size: 18px; }

/* =================================================================
   FILTER BAR
   ================================================================= */
.filter-bar {
  position: sticky; top: var(--header-h); z-index: 40;
  background: var(--cream-deep);
  border-top: 1px solid rgba(196,154,108,.35);
  border-bottom: 1px solid rgba(196,154,108,.35);
  box-shadow: 0 2px 12px rgba(74,46,30,.05);
}
.filter-inner {
  max-width: 1440px; margin: 0 auto;
  padding: 16px 32px;
  display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap;
}
.filter-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.filter-label {
  font-family: var(--serif-display); font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--warm-gray);
}
.filter-search { flex: 1 1 220px; }
.search-wrap { position: relative; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--warm-gray); pointer-events: none; }
.search-wrap input {
  width: 100%; background: var(--paper);
  border: 1px solid rgba(196,154,108,.5); border-radius: var(--radius);
  padding: 10px 12px 10px 36px; font-size: 15px; color: var(--ink);
  font-family: var(--serif-body); transition: border-color var(--transition), box-shadow var(--transition);
}
.search-wrap input:focus {
  outline: none; border-color: var(--coffee);
  box-shadow: 0 0 0 3px rgba(107,62,46,.12);
}

.select-wrap { position: relative; }
.select-wrap select {
  appearance: none; -webkit-appearance: none;
  background: var(--paper); color: var(--ink);
  border: 1px solid rgba(196,154,108,.5); border-radius: var(--radius);
  padding: 10px 32px 10px 12px; font-size: 15px; font-family: var(--serif-body);
  cursor: pointer; min-width: 150px; transition: border-color var(--transition), box-shadow var(--transition);
}
.select-wrap select:focus { outline: none; border-color: var(--coffee); box-shadow: 0 0 0 3px rgba(107,62,46,.12); }
.select-chevron { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--copper); pointer-events: none; }

/* dual range slider */
.range-wrap { position: relative; width: 210px; height: 38px; display: flex; flex-direction: column; }
.range-track {
  position: absolute; top: 14px; left: 0; right: 0; height: 4px;
  background: rgba(196,154,108,.35); border-radius: 2px;
}
#range-fill {
  position: absolute; height: 100%; border-radius: 2px;
  background: var(--coffee);
}
.range-wrap input[type=range] {
  position: absolute; top: 8px; left: 0; width: 100%; height: 16px;
  margin: 0; background: transparent; pointer-events: none;
  -webkit-appearance: none; appearance: none;
}
.range-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--coffee);
  box-shadow: 0 1px 4px rgba(74,46,30,.25); cursor: pointer; pointer-events: all;
  transition: transform .15s ease;
}
.range-wrap input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.range-wrap input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--coffee); cursor: pointer; pointer-events: all;
}
.range-vals {
  position: absolute; bottom: -2px; left: 0; right: 0;
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--warm-gray); font-variant-numeric: tabular-nums;
}

.reset-btn {
  background: transparent; color: var(--coffee);
  border: 1px solid var(--copper); border-radius: var(--radius);
  padding: 10px 16px; font-family: var(--serif-display); font-size: 14px; font-weight: 500;
  letter-spacing: .02em; transition: all var(--transition);
  align-self: flex-end;
}
.reset-btn:hover { background: var(--coffee); color: var(--cream); border-color: var(--coffee); }

/* =================================================================
   RESULTS META
   ================================================================= */
.results-meta { position: relative; z-index: 2; }
.results-inner {
  max-width: 1440px; margin: 0 auto; padding: 22px 32px 6px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.results-count {
  font-family: var(--serif-display); font-size: 15px; font-weight: 600;
  color: var(--coffee); margin: 0; letter-spacing: .02em;
}
.results-hint {
  font-family: var(--serif-deco); font-style: italic; font-size: 14px;
  color: var(--warm-gray); margin: 0;
}

/* =================================================================
   GRID + CARDS
   ================================================================= */
#main { position: relative; z-index: 2; }
.grid {
  max-width: 1440px; margin: 0 auto; padding: 20px 32px 60px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid rgba(196,154,108,.45); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden; cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  animation: cardIn .5s cubic-bezier(.22,.61,.36,1) both;
  will-change: transform;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateX(-26px); }
  to   { opacity: 1; transform: translateX(0); }
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--copper);
}
body.panel-open #main { transform: translateX(-5%); transition: transform .4s cubic-bezier(.22,.61,.36,1); }

.card-thumb {
  position: relative; width: 100%; aspect-ratio: 2/3;
  background: var(--cream-deep); overflow: hidden;
}
.card-thumb-img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.8) contrast(1.02);
  opacity: 0; transition: opacity .6s ease, filter .6s ease;
}
.card-thumb-img.loaded { opacity: 1; filter: saturate(1) contrast(1.02); }
.card-thumb-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(196,154,108,.18), transparent 55%),
    linear-gradient(135deg, #F1E9D9, #E7DCC6);
}
.card-thumb-placeholder span {
  font-family: var(--serif-display); font-weight: 700; font-size: 64px;
  color: var(--copper); opacity: .55;
}

/* ribbon: Editor's Pick */
.card-ribbon {
  position: absolute; top: 0; left: 0;
  background: var(--coffee); color: var(--cream);
  font-family: var(--serif-display); font-size: 10px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 12px 5px 10px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%);
  z-index: 2;
}
/* award medal */
.card-medal {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--copper); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; box-shadow: 0 2px 6px rgba(74,46,30,.3);
  border: 1.5px solid var(--cream);
  cursor: help;
}
.card-medal svg { width: 14px; height: 14px; }

.card-body { padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title {
  font-family: var(--serif-display); font-weight: 700; font-size: 18px; line-height: 1.25;
  color: var(--coffee-deep); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.5em;
}
.card-sub {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--serif-body); font-size: 14px; color: var(--coffee);
}
.card-sub .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--copper); display: inline-block; }
.card-sub .year { font-variant-numeric: tabular-nums; color: var(--warm-gray-deep); font-weight: 500; }
.card-desc {
  font-family: var(--serif-body); font-style: italic; font-size: 14px; font-weight: 400;
  color: var(--warm-gray-deep); line-height: 1.45; margin: 2px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.card-meta {
  margin-top: auto; padding: 10px 16px;
  border-top: 1px solid rgba(196,154,108,.3);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(180deg, transparent, rgba(249,245,238,.5));
}
.card-meta-text {
  font-family: var(--serif-display); font-size: 11px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--warm-gray);
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.card-meta-text .sep { color: var(--copper); }

.card-links { display: flex; align-items: center; gap: 8px; }
.card-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  color: var(--coffee); background: rgba(196,154,108,.12);
  border: 1px solid rgba(196,154,108,.3);
  transition: all var(--transition); text-decoration: none;
}
.card-link:hover { background: var(--coffee); color: var(--cream); border-color: var(--coffee); text-decoration: none; transform: scale(1.08); }
.card-link.disabled { opacity: .35; pointer-events: none; }
.card-link svg { width: 14px; height: 14px; }

/* category dot */
.cat-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--copper); transition: transform var(--transition);
}
.card:hover .cat-dot { transform: scale(1.3); }

/* sentinel + loader */
.sentinel { height: 1px; }
.loader {
  grid-column: 1 / -1; text-align: center; padding: 30px;
  font-family: var(--serif-deco); font-style: italic; color: var(--warm-gray);
}
.loader::after { content: "❦"; display: block; margin-top: 8px; color: var(--copper); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

/* empty state */
.empty-state {
  grid-column: 1 / -1; text-align: center; padding: 80px 24px;
  font-family: var(--serif-body); color: var(--warm-gray-deep);
}
.empty-ornament { font-size: 32px; color: var(--copper); margin-bottom: 12px; }
.empty-state p { font-size: 18px; margin: 0 0 20px; }
.empty-state .reset-btn { align-self: center; }

/* =================================================================
   DETAIL PANEL (right slide-in)
   ================================================================= */
.panel-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(40,24,16,.42);
  opacity: 0; transition: opacity var(--transition);
  backdrop-filter: blur(2px);
}
.panel-overlay.show { opacity: 1; }
.detail-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
  width: 42%; min-width: 380px; max-width: 620px;
  background: var(--cream);
  background-image: radial-gradient(circle at 90% 6%, rgba(196,154,108,.10), transparent 40%);
  box-shadow: var(--shadow-panel);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(.22,.61,.36,1);
  border-left: 1px solid rgba(196,154,108,.4);
}
.detail-panel.open { transform: translateX(0); }
.panel-close {
  position: absolute; top: 14px; right: 16px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--paper); color: var(--coffee);
  border: 1px solid rgba(196,154,108,.5);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.panel-close:hover { background: var(--coffee); color: var(--cream); transform: rotate(90deg); }
.panel-drag { display: none; }

.panel-scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: var(--copper) transparent;
}
.panel-scroll::-webkit-scrollbar { width: 8px; }
.panel-scroll::-webkit-scrollbar-thumb { background: var(--copper); border-radius: 4px; }
.panel-scroll::-webkit-scrollbar-track { background: transparent; }

.panel-content { padding: 36px 40px 20px; }
.panel-hero {
  display: flex; gap: 24px; margin-bottom: 26px;
  padding-bottom: 24px; border-bottom: 1px solid rgba(196,154,108,.35);
}
.panel-thumb {
  flex: 0 0 130px; aspect-ratio: 2/3; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-card);
  background: var(--cream-deep);
}
.panel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.panel-hero-text { flex: 1; min-width: 0; }
.panel-eyebrow {
  font-family: var(--serif-deco); font-style: italic; font-size: 13px;
  letter-spacing: .1em; color: var(--copper); margin: 0 0 8px;
}
#panel-title {
  font-family: var(--serif-display); font-weight: 800; font-size: 28px; line-height: 1.15;
  color: var(--coffee-deep); margin: 0 0 10px;
}
.panel-author {
  font-family: var(--serif-body); font-size: 16px; color: var(--coffee);
  margin: 0 0 14px; font-style: italic;
}
.panel-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.panel-tag {
  font-family: var(--serif-display); font-size: 11px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(196,154,108,.16); color: var(--coffee);
  border: 1px solid rgba(196,154,108,.3);
}
.panel-tag.first { background: var(--coffee); color: var(--cream); border-color: var(--coffee); }

.panel-section { margin-bottom: 26px; }
.panel-section h4 {
  font-family: var(--serif-display); font-size: 12px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--copper);
  margin: 0 0 12px; display: flex; align-items: center; gap: 10px;
}
.panel-section h4::after { content: ""; flex: 1; height: 1px; background: rgba(196,154,108,.3); }

.panel-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px;
}
.panel-meta-item { display: flex; flex-direction: column; gap: 2px; }
.panel-meta-item .k {
  font-family: var(--serif-display); font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--warm-gray);
}
.panel-meta-item .v { font-family: var(--serif-body); font-size: 15px; color: var(--ink); }

.panel-desc {
  font-family: var(--serif-body); font-size: 16px; line-height: 1.75; color: var(--ink);
  white-space: pre-line;
}
.panel-desc h2 {
  font-family: var(--serif-display); font-weight: 700; font-size: 19px;
  color: var(--coffee-deep); margin: 22px 0 8px;
}
.panel-desc h2:first-child { margin-top: 0; }

.panel-author-bio {
  font-family: var(--serif-body); font-size: 15px; line-height: 1.7; color: var(--warm-gray-deep);
  font-style: italic; padding: 16px 20px;
  background: rgba(196,154,108,.10); border-left: 3px solid var(--copper); border-radius: 0 var(--radius) var(--radius) 0;
}
.panel-award {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px; background: rgba(196,154,108,.14);
  border: 1px solid rgba(196,154,108,.35); border-radius: var(--radius);
  font-family: var(--serif-body); font-size: 14.5px; color: var(--coffee-deep); line-height: 1.55;
}
.panel-award .medal-ico { color: var(--copper); flex-shrink: 0; margin-top: 1px; }

.panel-discover {
  font-family: var(--serif-deco); font-style: italic; font-size: 16px;
  color: var(--coffee); padding: 12px 18px;
  background: rgba(107,62,46,.06); border-radius: var(--radius);
  border: 1px dashed rgba(107,62,46,.25);
}

.panel-ext-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius);
  background: var(--coffee); color: var(--cream);
  font-family: var(--serif-display); font-size: 14px; font-weight: 500;
  letter-spacing: .02em; transition: background var(--transition); text-decoration: none;
}
.panel-ext-link:hover { background: var(--coffee-deep); text-decoration: none; }
.panel-ext-link.disabled { background: var(--warm-gray); opacity: .5; pointer-events: none; }

.panel-nav {
  display: flex; gap: 12px; padding: 14px 40px;
  border-top: 1px solid rgba(196,154,108,.35);
  background: var(--cream-deep);
}
.panel-nav-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border-radius: var(--radius);
  background: var(--paper); color: var(--coffee);
  border: 1px solid rgba(196,154,108,.5);
  font-family: var(--serif-display); font-size: 14px; font-weight: 500;
  transition: all var(--transition);
}
.panel-nav-btn:hover { background: var(--coffee); color: var(--cream); border-color: var(--coffee); }
.panel-nav-btn:disabled { opacity: .35; cursor: not-allowed; }
.panel-nav-btn:disabled:hover { background: var(--paper); color: var(--coffee); border-color: rgba(196,154,108,.5); }

/* =================================================================
   MOBILE FILTER SHEET
   ================================================================= */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(40,24,16,.5); opacity: 0; transition: opacity var(--transition);
  backdrop-filter: blur(3px);
}
.sheet-overlay.show { opacity: 1; }
.filter-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: var(--cream); border-radius: 18px 18px 0 0;
  max-height: 86vh; display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 -10px 40px rgba(40,24,16,.25);
}
.filter-sheet.open { transform: translateY(0); }
.sheet-handle { width: 44px; height: 5px; background: var(--copper); border-radius: 3px; margin: 10px auto 4px; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 22px 14px; border-bottom: 1px solid rgba(196,154,108,.3);
}
.sheet-head h3 { font-family: var(--serif-display); font-weight: 700; font-size: 19px; color: var(--coffee-deep); margin: 0; }
.sheet-close {
  width: 34px; height: 34px; border-radius: 50%; background: var(--paper);
  border: 1px solid rgba(196,154,108,.5); color: var(--coffee);
  display: flex; align-items: center; justify-content: center;
}
.sheet-close:hover { background: var(--coffee); color: var(--cream); }
.sheet-body { padding: 18px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.sheet-foot {
  display: flex; gap: 12px; padding: 14px 22px 20px;
  border-top: 1px solid rgba(196,154,108,.3);
}
.apply-btn {
  flex: 1; background: var(--coffee); color: var(--cream);
  border: none; border-radius: var(--radius); padding: 13px;
  font-family: var(--serif-display); font-size: 15px; font-weight: 600;
  transition: background var(--transition);
}
.apply-btn:hover { background: var(--coffee-deep); }
.sheet-foot .reset-btn { flex: 0 0 auto; }

/* =================================================================
   FOOTER
   ================================================================= */
.site-footer {
  position: relative; z-index: 2;
  background: var(--coffee-deep); color: var(--cream);
  margin-top: 40px; padding: 50px 32px 0;
}
.footer-inner {
  max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1.6fr; gap: 40px;
  padding-bottom: 36px; border-bottom: 1px solid rgba(196,154,108,.3);
}
.footer-title { font-family: var(--serif-display); font-weight: 700; font-size: 22px; margin: 0 0 6px; color: var(--copper-soft); }
.footer-motto { font-family: var(--serif-deco); font-style: italic; font-size: 15px; color: var(--cream); opacity: .8; margin: 0; }
.footer-col h4 {
  font-family: var(--serif-display); font-size: 12px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--copper-soft);
  margin: 0 0 14px;
}
.footer-col a { display: block; color: var(--cream); opacity: .82; padding: 4px 0; font-size: 15px; }
.footer-col a:hover { color: var(--copper-soft); opacity: 1; text-decoration: none; }
.footer-col p { font-size: 14.5px; line-height: 1.65; opacity: .8; margin: 0; }
.footer-bottom {
  max-width: 1440px; margin: 0 auto; padding: 18px 0 24px;
  text-align: center; font-family: var(--serif-deco); font-style: italic;
  font-size: 13px; color: var(--copper-soft); opacity: .7;
}

/* =================================================================
   INFO PAGES (about / contact / policy)
   ================================================================= */
.page-main { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; padding: 56px 28px 80px; }
.page-eyebrow {
  font-family: var(--serif-deco); font-style: italic; font-size: 14px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--copper); margin: 0 0 12px;
}
.page-title {
  font-family: var(--serif-display); font-weight: 800; font-size: clamp(34px, 5vw, 48px);
  color: var(--coffee-deep); margin: 0 0 8px; line-height: 1.1;
}
.page-lede {
  font-family: var(--serif-body); font-size: 19px; line-height: 1.7; color: var(--warm-gray-deep);
  font-style: italic; margin: 0 0 36px; padding-bottom: 28px;
  border-bottom: 1px solid rgba(196,154,108,.4);
}
.page-section { margin-bottom: 34px; }
.page-section h2 {
  font-family: var(--serif-display); font-weight: 700; font-size: 24px;
  color: var(--coffee-deep); margin: 0 0 12px; display: flex; align-items: center; gap: 12px;
}
.page-section h2::before { content: ""; width: 24px; height: 2px; background: var(--copper); }
.page-section p { font-size: 17px; line-height: 1.75; color: var(--ink); margin: 0 0 14px; }
.page-section ul { margin: 0 0 14px; padding-left: 22px; }
.page-section li { font-size: 16.5px; line-height: 1.7; color: var(--ink); margin-bottom: 6px; }
.page-section a { color: var(--coffee); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--copper); }

.contact-card {
  background: var(--paper); border: 1px solid rgba(196,154,108,.45); border-radius: var(--radius-lg);
  padding: 28px 32px; box-shadow: var(--shadow-card); margin-top: 8px;
}
.contact-card .label {
  font-family: var(--serif-display); font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--warm-gray); margin-bottom: 4px;
}
.contact-card .value { font-family: var(--serif-body); font-size: 20px; color: var(--coffee-deep); margin-bottom: 18px; }
.contact-card .value a { color: var(--coffee); }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--serif-display); font-size: 14px; color: var(--coffee);
  margin-bottom: 26px; transition: gap var(--transition);
}
.back-link:hover { gap: 12px; text-decoration: none; }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .detail-panel { width: 50%; }
}
@media (max-width: 900px) {
  .header-nav { display: none; }
  .filter-toggle { display: inline-flex; }
  .filter-bar { display: none; }
  .filter-bar.show {
    display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 80;
    background: var(--cream); padding: 0; border: none; box-shadow: 0 8px 30px rgba(40,24,16,.2);
    max-height: 100vh; overflow-y: auto;
  }
  .hero { padding: 48px 22px 28px; }
  .results-inner { padding: 18px 22px 4px; }
  .grid { padding: 18px 22px 50px; gap: 16px; }
  .panel-content { padding: 30px 26px 16px; }
  .panel-nav { padding: 12px 26px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 768px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-body { padding: 11px 12px 9px; }
  .card-title { font-size: 15px; min-height: 2.2em; }
  .card-sub { font-size: 12.5px; }
  .card-desc { font-size: 12.5px; -webkit-line-clamp: 1; }
  .card-meta { padding: 8px 12px; }
  .card-meta-text { font-size: 9.5px; gap: 5px; }
  .card-meta-text .binding-mobile { display: none; }
  .card-link { width: 24px; height: 24px; }
  .card-link svg { width: 12px; height: 12px; }
  .card-thumb-placeholder span { font-size: 44px; }

  /* panel becomes full-screen bottom sheet */
  .detail-panel {
    width: 100%; max-width: none; min-width: 0;
    top: auto; bottom: 0; border-radius: 18px 18px 0 0;
    border-left: none; border-top: 1px solid rgba(196,154,108,.4);
    max-height: 92vh;
  }
  .panel-drag {
    display: block; position: relative; width: 44px; height: 5px;
    background: var(--copper); border-radius: 3px; margin: 10px auto 0;
  }
  .panel-close { top: 12px; right: 14px; width: 34px; height: 34px; }
  .panel-hero { flex-direction: column; gap: 16px; align-items: flex-start; }
  .panel-thumb { flex: 0 0 auto; width: 110px; }
  #panel-title { font-size: 23px; }
  .panel-meta-grid { grid-template-columns: 1fr; gap: 10px; }
  .panel-content { padding: 22px 22px 14px; }
  .panel-nav { padding: 12px 22px 18px; }
  body.panel-open #main { transform: none; }

  .header-inner { padding: 12px 20px; gap: 14px; }
  .brand-title { font-size: 18px; }
  .brand-motto { font-size: 11px; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .card { animation: none; }
}
