/* where can i meditate — ink on rice paper. Black, gray, white; the only
   warmth is the faint paper grain. Stillness.
   (Note: --moss / --terracotta are historical variable names from an earlier
   warm palette — their VALUES are now ink tones. Owner direction 2026-06-12:
   "black gray and white… like ink on paper".) */

:root {
  --paper: #f9f8f4;
  --paper-deep: #efeee8;
  --ink: #1c1b19;
  --ink-faded: #57554f;
  --ink-faint: #8d8a82;
  --hairline: #d9d7d0;
  --moss: #1c1b19;
  --moss-deep: #000000;
  --terracotta: #57554f;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --measure: 42rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  /* faint paper grain — a whisper, not a texture pack */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration-color: var(--ink-faint); text-underline-offset: 0.18em; }
a:hover, a:focus-visible { text-decoration-color: var(--moss); color: var(--moss-deep); }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; border-radius: 1px; }

/* ── header / footer ─────────────────────────────────────────── */

.sample-banner {
  background: var(--terracotta);
  color: var(--paper);
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.site-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0;
}
.site-header .site-nav { align-self: flex-end; }

.wordmark {
  font-style: italic;
  font-size: 2.1rem;
  line-height: 1.15;
  text-decoration: none;
  letter-spacing: 0.005em;
}
.wordmark:hover { color: var(--moss-deep); }

.site-nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.site-nav a { text-decoration: none; color: var(--ink-faded); }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--moss-deep); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 1px solid var(--moss);
}

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.site-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
  border-top: 1px solid var(--hairline);
  color: var(--ink-faded);
  font-size: 0.875rem;
}
.site-footer p { margin: 0.2rem 0; }

/* ── intro ────────────────────────────────────────────────────── */

.intro { margin-top: 1.9rem; }

.controls h1 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 1.1rem;
  letter-spacing: -0.005em;
}

.intro p {
  color: var(--ink-faded);
  font-size: 0.975rem;
  margin: 0.7rem 0;
}
.odf-note a { color: var(--moss-deep); }

.tool-divider {
  border: none;
  border-top: 3px double var(--ink-faint);
  margin: 2rem 0 0;
}

/* ── controls ─────────────────────────────────────────────────── */

.controls { margin: 2.25rem 0 0.5rem; }

#q {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink-faint);
  padding: 0.45rem 0.1rem;
  border-radius: 0;
}
#q::placeholder { color: var(--ink-faint); font-style: italic; }
#q:focus { outline: none; border-bottom-color: var(--moss); }

.filters { margin-top: 0.9rem; }
.filters summary {
  cursor: pointer;
  color: var(--ink-faded);
  font-size: 0.95rem;
  width: max-content;
  letter-spacing: 0.04em;
  list-style-position: outside;
}
.filters summary:hover { color: var(--moss-deep); }

.filter-groups {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.1rem 0 0.4rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 1.1rem;
  border-bottom: 1px solid var(--paper-deep);
  padding-bottom: 0.7rem;
}

.filter-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  min-width: 5.6rem;
}

.ck {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.92rem;
  color: var(--ink-faded);
  cursor: pointer;
  user-select: none;
}
.ck:hover { color: var(--ink); }
.ck input {
  appearance: auto;
  width: 0.95rem; height: 0.95rem;
  margin: 0;
  accent-color: var(--moss);
  cursor: pointer;
}
.ck:has(input:checked) { color: var(--moss-deep); }

.cost-row { align-items: center; }
.cost-row input[type="range"] { max-width: 16rem; }
.cost-row output { font-size: 0.95rem; color: var(--moss-deep); min-width: 4.5rem; }

.filter-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.35rem;
}

input[type="range"] {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  height: 2px;
  background: var(--hairline);
  border-radius: 1px;
  outline-offset: 6px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.05rem; height: 1.05rem;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--moss);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 1.05rem; height: 1.05rem;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--moss);
  cursor: pointer;
}

.filter-hint { font-size: 0.8rem; color: var(--ink-faint); margin: -0.45rem 0 0 calc(5.6rem + 1.1rem); font-style: italic; }

.date-label { display: inline-flex; align-items: baseline; gap: 0.45rem; font-size: 0.9rem; color: var(--ink-faded); }
input[type="date"] {
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline);
  padding: 0.15rem 0.1rem;
  border-radius: 0;
}
input[type="date"]:focus { outline: none; border-bottom-color: var(--moss); }

.clear-btn {
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink-faded);
  background: none;
  border: none;
  padding: 0;
  width: max-content;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--ink-faint);
  text-underline-offset: 0.18em;
}
.clear-btn:hover { color: var(--terracotta); }

.count {
  margin: 1.4rem 0 0;
  padding-bottom: 0.8rem;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--ink-faint);
}

/* ── the list ─────────────────────────────────────────────────── */

.list { margin-top: 0.4rem; }

.entry {
  border-top: 1px solid var(--hairline);
  padding: 1.5rem 0 1.6rem;
  animation: settle 480ms ease-out backwards;
}
/* the filter hides entries via the hidden attribute; this must beat any
   display set by layout rules (the desktop grid once swallowed it — bug) */
.entry[hidden] { display: none !important; }
.entry:first-of-type { border-top: none; }
@keyframes settle {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.entry:nth-of-type(1) { animation-delay: 40ms; }
.entry:nth-of-type(2) { animation-delay: 90ms; }
.entry:nth-of-type(3) { animation-delay: 140ms; }
.entry:nth-of-type(4) { animation-delay: 190ms; }
@media (prefers-reduced-motion: reduce) {
  .entry { animation: none; }
}

.entry-when {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss-deep);
  margin-bottom: 0.35rem;
}
.entry-nights { color: var(--ink-faint); letter-spacing: 0.08em; }

.entry-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.3rem;
}
.entry-title a {
  text-decoration: none;
  background-image: linear-gradient(var(--moss), var(--moss));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 220ms ease;
}
.entry-title a:hover, .entry-title a:focus-visible { background-size: 100% 1px; color: inherit; }

.entry-body p { margin: 0.22rem 0; }

.entry-where { font-size: 0.95rem; color: var(--ink-faded); }
.entry-region { color: var(--ink-faint); }

.entry-cost { font-size: 0.95rem; }
.entry-cost.is-unknown { color: var(--ink-faint); font-style: italic; }
.cost-accent { color: var(--moss-deep); font-weight: 600; }
.entry-cost-note { font-size: 0.85rem; color: var(--ink-faint); font-style: italic; }

.entry-meta { font-size: 0.95rem; color: var(--ink-faded); }
.status-open { color: var(--ink); }
.status-full { color: var(--ink-faded); font-style: italic; }
.status-unknown { color: var(--ink-faint); font-style: italic; }

.entry-elig {
  font-size: 0.85rem;
  color: var(--moss-deep);
  border-bottom: 1px dotted var(--moss);
  width: max-content;
  max-width: 100%;
}

.entry-desc {
  font-size: 0.95rem;
  color: var(--ink-faded);
  margin-top: 0.55rem !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
  transition: color 150ms ease;
}
.entry-desc:hover { color: var(--ink); }
.entry-desc.expanded { display: block; -webkit-line-clamp: unset; }

.entry-note { font-size: 0.9rem; font-style: italic; color: var(--ink-faded); }

.entry-verified {
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-top: 0.6rem !important;
}

.no-results {
  padding: 3rem 0;
  text-align: center;
  color: var(--ink-faded);
  font-style: italic;
}

.ongoing-section { margin-top: 2.5rem; }
.section-head {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--moss-deep);
  border-top: 3px double var(--ink-faint);
  padding-top: 1.4rem;
  margin: 0 0 0.3rem;
}
.section-sub {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-faint);
  margin: 0 0 0.6rem;
}
.ongoing-section .entry:first-of-type { border-top: none; }

/* desktop: the date becomes a left rail — printed timetable */
@media (min-width: 56rem) {
  main, .site-header { max-width: 50rem; }
  .entry { display: grid; grid-template-columns: 10.5rem 1fr; gap: 0 1.5rem; }
  .entry-when { flex-direction: column; gap: 0.15rem; margin-top: 0.35rem; }
}

/* ── prose pages ──────────────────────────────────────────────── */

.prose { margin-top: 2.75rem; max-width: 36rem; }
.prose h1 { font-size: 1.6rem; font-weight: 500; margin: 0 0 1.25rem; }
.prose p { margin: 0.9rem 0; color: var(--ink); }
.prose ul { margin: 0.9rem 0; padding-left: 1.3rem; }
.prose li { margin: 0.55rem 0; }

.give { margin: 1.6rem 0 !important; display: flex; gap: 0.8rem; flex-wrap: wrap; }
.give-button {
  display: inline-block;
  font-size: 1rem;
  text-decoration: none;
  color: var(--paper);
  background: var(--moss);
  padding: 0.5rem 1.6rem;
  border-radius: 2px;
  letter-spacing: 0.03em;
  transition: background-color 150ms ease;
}
.give-button:hover, .give-button:focus-visible { background: var(--moss-deep); color: var(--paper); }
