/* Find — minimal, classic, quiet. One serif for headings, one sans for
   everything else, a single rule weight, and no colour that isn't carrying
   meaning.
   
   The ground is dark by default and warm rather than black: #16140f sits
   just off true black, so there is no halo around the type, and the text is
   a soft bone white at roughly 11:1 against it — readable for a long sitting
   without the glare that a white page gives at night. Pure #fff on pure #000
   is the thing that hurts; neither appears here. A light ground is still
   offered to anyone whose system asks for one. */

:root {
  --bg: #16140f;
  --ink: #e6e0d4;
  --muted: #8b847a;
  --line: #262219;
  --radius: 2px;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }

/* ------------------------------------------------------------------ head */
.head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1.5rem; max-width: 900px; margin: 0 auto;
  padding: 2.5rem 2rem 1rem; border-bottom: 1px solid var(--line);
}
.rubric { flex: 1; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.wordmark { font-family: var(--serif); font-size: .82rem; letter-spacing: .26em; text-transform: uppercase; }
.who { font-size: .8rem; color: var(--muted); display: flex; gap: 1rem; align-items: baseline; }

.btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--line);
}
.btn:hover { color: var(--ink); border-color: var(--ink); }

/* ------------------------------------------------------------------ main */
main { max-width: 900px; margin: 0 auto; padding: 0 2rem 6rem; }
h1 { font-family: var(--serif); font-weight: 400; font-size: 1.95rem; line-height: 1.35;
  max-width: 20ch; margin: 3.5rem 0 2.25rem; }
.lede { color: var(--muted); max-width: 40ch; margin: 0 0 3rem; font-size: .9rem; }

/* Before the first search the page is only its question and the line to type
   on; the filters and the tabs appear once there is something to filter. */
body:not(.searched) .filters,
body:not(.searched) .tabs,
body:not(.searched) .status { display: none; }
body:not(.searched) h2 { display: none; }

/* One ruled box, the way a form on paper is ruled: the field and its button
   share a single hairline rather than each carrying their own. */
.search { display: grid; grid-template-columns: 1fr auto; border: 1px solid var(--line); margin-bottom: 2.5rem; }
.search:focus-within { border-color: var(--ink); }
.search input {
  border: 0; background: none; outline: none;
  font-size: .98rem; padding: 1.05rem 1.15rem;
}
.search input::placeholder { color: var(--muted); }
.search button {
  background: var(--ink); color: var(--bg); border: 0; cursor: pointer;
  padding: 0 1.8rem; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
}
.search button:hover { opacity: .85; }

/* ------------------------------------------------------------ explainer */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.25rem; margin-bottom: 1rem; }
.how figure { margin: 0; border-top: 1px solid var(--line); padding-top: 1rem; color: var(--ink); }
.how svg { width: 100%; height: 56px; display: block; margin-bottom: .9rem; color: var(--muted); }
.how figcaption { font-size: .8rem; color: var(--muted); line-height: 1.5; }
.how b { font-weight: 500; color: var(--ink); }
body.searched .how { display: none; }

/* Each panel is also a button: it runs the example it illustrates. */
.how figure { cursor: pointer; transition: color .25s ease, border-color .25s ease; }
.how figure:hover, .how figure:focus-visible { color: var(--ink); border-color: var(--ink); outline: none; }
.how figure:hover svg, .how figure:focus-visible svg { color: var(--ink); }

/* --- the drawings move, slowly, on a ten-second loop -------------------
   Each one shows the step it describes rather than decorating it: the
   sentence types itself and keeps its subject words lit, the lens crosses
   from one shelf to the other, and a pick is handed over and liked. */

/* 1. typing */
.type { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 9s ease-in-out infinite; opacity: .75; }
.t2 { animation-delay: .5s; opacity: .5; }
.t3 { animation-delay: 1s; opacity: .35; }
@keyframes draw {
  0% { stroke-dashoffset: 60; }
  22%, 72% { stroke-dashoffset: 0; }
  86%, 100% { stroke-dashoffset: 60; }
}
/* the two words the search actually keeps */
.keep { fill: var(--ink); opacity: 0; animation: lit 9s ease-in-out infinite; }
.k1 { animation-delay: 2.1s; }
.k2 { animation-delay: 2.5s; }
@keyframes lit { 0%, 10% { opacity: 0; } 25%, 70% { opacity: .22; } 85%, 100% { opacity: 0; } }
.caret { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* 2. the lens crossing both shelves */
.lens { animation: sweep 9s ease-in-out infinite; }
@keyframes sweep {
  0%, 8% { transform: translateX(-24px); }
  45%, 55% { transform: translateX(0); }
  92%, 100% { transform: translateX(24px); }
}

/* 3. the hand-off, then the like */
.pass { animation: hand 9s ease-in-out infinite; }
@keyframes hand {
  0%, 15% { transform: translateX(0); opacity: .8; }
  45%, 100% { transform: translateX(46px); opacity: .8; }
}
.heart { opacity: 0; transform-origin: 46px 50px; animation: beat 9s ease-in-out infinite; }
@keyframes beat {
  0%, 48% { opacity: 0; transform: scale(.6); }
  56% { opacity: .9; transform: scale(1.15); }
  62%, 92% { opacity: .75; transform: scale(1); }
  100% { opacity: 0; transform: scale(.6); }
}

/* Anyone who asks for less motion gets the finished frame, not the loop. */
@media (prefers-reduced-motion: reduce) {
  .type, .keep, .caret, .lens, .pass, .heart { animation: none; }
  .type { stroke-dashoffset: 0; }
  .keep { opacity: .22; }
  .heart { opacity: .75; transform: none; }
  .pass { transform: translateX(46px); }
}

.filters { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-bottom: 1.75rem; align-items: center; }
.filters select {
  background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: .2rem 0; font-size: .78rem; color: var(--muted); cursor: pointer;
}
.filters select:hover, .filters select:focus { color: var(--ink); border-color: var(--ink); outline: none; }
.check { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; cursor: pointer; }
.check input { accent-color: var(--ink); }

.tabs { display: flex; gap: 1.75rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.tab {
  background: none; border: 0; padding: 0 0 .3rem; cursor: pointer;
  font-size: .78rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid transparent;
}
.tab.on { color: var(--ink); border-color: var(--ink); }

.status { color: var(--muted); font-size: .82rem; min-height: 1.3em; margin: 0 0 1.5rem; }

/* --------------------------------------------------------------- results */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
h2 { font-weight: 500; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }

.list { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 46px 1fr; gap: 1rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.cover { width: 46px; aspect-ratio: 2/3; background: var(--line); overflow: hidden; border-radius: var(--radius); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row h3 { font-family: var(--serif); font-weight: 400; font-size: 1.02rem; margin: 0 0 .15rem; line-height: 1.3; }
.meta { font-size: .76rem; color: var(--muted); margin: 0 0 .4rem; }
.blurb { font-size: .83rem; color: var(--muted); margin: 0 0 .5rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.acts { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .76rem; }
.acts a, .acts button { color: var(--muted); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; border-bottom: 1px solid transparent; }
.acts a:hover, .acts button:hover { color: var(--ink); border-color: var(--ink); }
.acts .on { color: var(--ink); }

/* ------------------------------------------------------------ feed/board */
.feed { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.feed button { background: none; border: 0; cursor: pointer; padding: 0; text-align: left; }
.feed .topic { font-family: var(--serif); font-size: 1rem; border-bottom: 1px solid var(--line); }
.feed button:hover .topic { border-color: var(--ink); }
.handle { font-size: .72rem; color: var(--muted); letter-spacing: .04em; }

.note { font-size: .82rem; color: var(--muted); font-style: italic; margin: .3rem 0 0; }
.empty { color: var(--muted); font-size: .85rem; }

dialog {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: var(--radius); padding: 1.5rem; max-width: 380px; width: 90%;
}
dialog::backdrop { background: rgba(0,0,0,.35); }
dialog h3 { font-family: var(--serif); font-weight: 500; margin: 0 0 1rem; }
dialog label { display: block; font-size: .76rem; color: var(--muted); margin-bottom: 1rem; }
dialog select, dialog input {
  width: 100%; margin-top: .3rem; padding: .45rem 0; background: none;
  border: 0; border-bottom: 1px solid var(--line); outline: none; font-size: .9rem;
}
.dialog-acts { display: flex; justify-content: flex-end; gap: 1.25rem; }

@media (max-width: 720px) {
  .cols, .how { grid-template-columns: 1fr; gap: 2rem; }
  h1 { font-size: 1.6rem; margin-top: 2.5rem; }
  .head { flex-wrap: wrap; }
  .rubric { order: 3; flex-basis: 100%; }
}
