/* ============================================================
   SHOULD I READ IT — "the night librarian"
   Desk: banker's-lamp green. Cards: manila index cards.
   Type: Fraunces (display) + Courier Prime (typewriter).
   Signature: the verdict rubber stamp.
   ============================================================ */

:root {
  --desk: #16352b;
  --desk-deep: #0f271f;
  --card: #f1e7d2;
  --card-edge: #dccdab;
  --ink: #241b0e;
  --ink-soft: #6b5e42;
  --rule-red: #c98a80;
  --rule-blue: rgba(101, 134, 168, 0.38);
  --lamp: #d9a441;
  --on-desk: #eaf0ea;
  --on-desk-dim: #a3bba9;
  --stamp-read: #2e6b4f;
  --stamp-skip: #b23a2c;
  --stamp-depends: #a87a1f;
  --serif: "Fraunces", Georgia, serif;
  --type: "Courier Prime", "Courier New", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html {
  background: var(--desk-deep);
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 500px at 50% -100px, rgba(217, 164, 65, 0.10), transparent 60%),
    linear-gradient(180deg, var(--desk) 0%, var(--desk-deep) 100%);
  color: var(--on-desk);
  font-family: var(--type);
  font-size: 16px;
  line-height: 1.5;
}

::selection { background: var(--lamp); color: var(--desk-deep); }

:focus-visible {
  outline: 2px solid var(--lamp);
  outline-offset: 2px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- ad slots (reserved) ---------- */

.ad-slot {
  position: relative;
  margin: 18px auto 0;
  width: min(970px, calc(100% - 32px));
  border: 2px dashed rgba(217, 164, 65, 0.5);
  border-radius: 4px;
  text-align: center;
  color: var(--on-desk-dim);
  background: rgba(255, 255, 255, 0.02);
}

.ad-tag {
  position: absolute;
  top: -9px; left: 12px;
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  padding: 1px 7px;
  background: var(--desk-deep);
  color: var(--on-desk-dim);
  border: 1px solid rgba(217, 164, 65, 0.35);
  border-radius: 2px;
}

.ad-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 88px;
  padding: 10px 16px;
}

.ad-line1 { font-weight: 700; letter-spacing: 0.18em; font-size: 0.78rem; }
.ad-line2 { font-size: 0.74rem; font-style: italic; }

.ad-square {
  width: min(300px, 100%);
  margin: 0;
}
.ad-square .ad-body { min-height: 250px; }

.ad-instack {
  width: min(760px, 100%);
}
.ad-instack .ad-body { min-height: 72px; }

/* ---------- masthead ---------- */

.masthead {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 20px 8px;
  text-align: center;
}

.plate {
  display: inline-block;
  margin: 0 0 26px;
  padding: 5px 14px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--lamp);
  border-top: 1px solid rgba(217, 164, 65, 0.55);
  border-bottom: 1px solid rgba(217, 164, 65, 0.55);
}

.hero {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 560;
  font-variation-settings: "opsz" 100;
  font-size: clamp(2.5rem, 6.5vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--on-desk);
}

.hero em {
  font-style: italic;
  color: var(--lamp);
}

.hero-sub {
  margin: 0 auto 34px;
  max-width: 36em;
  color: var(--on-desk-dim);
  font-size: 0.95rem;
}

/* ---------- the drawer (search) ---------- */

.drawer {
  display: flex;
  gap: 0;
  max-width: 640px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 4px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--card-edge);
  padding: 8px;
  transform: rotate(-0.4deg);
}

.drawer input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: var(--type);
  font-size: 1.05rem;
  color: var(--ink);
  padding: 12px 12px;
}
.drawer input::placeholder { color: var(--ink-soft); opacity: 0.75; }
.drawer input:focus { outline: none; }

.btn-primary {
  border: 2px solid var(--desk);
  background: var(--desk);
  color: var(--card);
  font-family: var(--type);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  padding: 12px 18px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease, color 140ms ease;
}
.btn-primary:hover { background: var(--desk-deep); }
.btn-primary:active { transform: translateY(1px); }

/* ---------- chips ---------- */

.chips-row { margin: 26px 0 10px; font-size: 0.74rem; color: var(--on-desk-dim); }

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-bottom: 6px;
}

.chip {
  font-family: var(--type);
  font-size: 0.78rem;
  color: var(--on-desk);
  background: transparent;
  border: 1px solid rgba(163, 187, 169, 0.45);
  border-radius: 2px;
  padding: 6px 12px;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}
.chip:hover { border-color: var(--lamp); color: var(--lamp); }

/* ---------- the stage & cards ---------- */

#stage {
  max-width: 780px;
  margin: 34px auto 10px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.verdict-card {
  position: relative;
  background:
    linear-gradient(180deg, transparent 54px, var(--rule-red) 54px, var(--rule-red) 56px, transparent 56px),
    repeating-linear-gradient(180deg, transparent 0, transparent 27px, var(--rule-blue) 27px, var(--rule-blue) 28px),
    var(--card);
  color: var(--ink);
  border: 1px solid var(--card-edge);
  border-radius: 4px;
  padding: 18px 26px 20px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
}

#stage > :nth-child(odd) .verdict-card,
#stage > .verdict-card:nth-child(odd) { transform: rotate(-0.55deg); }
#stage > :nth-child(even) .verdict-card,
#stage > .verdict-card:nth-child(even) { transform: rotate(0.45deg); }

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 30px;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.card-head .card-no { white-space: nowrap; }

.link-btn {
  font-family: var(--type);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  background: none;
  border: none;
  border-bottom: 1px dashed var(--ink-soft);
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}
.link-btn:hover { color: var(--ink); border-bottom-color: var(--ink); }

.tier-eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--stamp-skip);
}

.tier-hint {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--ink-soft);
}

.card-title {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  line-height: 1.1;
}

.card-byline { margin: 0 0 16px; font-size: 0.85rem; color: var(--ink-soft); }

.card-text { margin: 0 0 12px; font-size: 1.04rem; line-height: 1.75; }

.cheat-list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.cheat-list li {
  padding: 10px 0 10px 26px;
  border-bottom: 1px dashed rgba(107, 94, 66, 0.5);
  position: relative;
  font-size: 0.98rem;
  line-height: 1.6;
}
.cheat-list li:last-child { border-bottom: none; }
.cheat-list li::before {
  content: "▪";
  position: absolute;
  left: 2px;
  top: 9px;
  color: var(--stamp-depends);
  font-size: 1rem;
}

/* the verdict stamp — signature element */
.stamp {
  position: absolute;
  top: 40px;
  right: 14px;
  transform: rotate(-8deg);
  color: var(--stamp-depends);
  border: 3px solid currentColor;
  border-radius: 6px;
  padding: 6px 14px 5px;
  font-weight: 700;
  font-size: clamp(1.1rem, 3.4vw, 1.7rem);
  letter-spacing: 0.14em;
  text-align: center;
  opacity: 0.92;
  mix-blend-mode: multiply;
  box-shadow: inset 0 0 0 1.5px currentColor;
  pointer-events: none;
}
.stamp-read { color: var(--stamp-read); }
.stamp-skip { color: var(--stamp-skip); }
.stamp-depends { color: var(--stamp-depends); }

@media (prefers-reduced-motion: no-preference) {
  .stamp-in { animation: stamp-in 420ms cubic-bezier(0.2, 1.6, 0.4, 1) both; }
  @keyframes stamp-in {
    from { transform: scale(2.1) rotate(-2deg); opacity: 0; }
    60%  { opacity: 0.95; }
    to   { transform: scale(1) rotate(-8deg); opacity: 0.92; }
  }
  .card-in { animation: card-in 380ms ease-out both; }
  @keyframes card-in {
    from { opacity: 0; translate: 0 16px; }
    to   { opacity: 1; translate: 0 0; }
  }
}

/* card footer actions */
.card-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(107, 94, 66, 0.35);
}

.btn-more {
  font-family: var(--type);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.05em;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 3px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 130ms ease, color 130ms ease;
}
.btn-more:hover { background: var(--ink); color: var(--card); }
.btn-more:active { transform: translateY(1px); }

.action-note { font-size: 0.72rem; font-style: italic; color: var(--ink-soft); }

/* loading card */
.loading-card { text-align: center; padding: 34px 26px 30px; }
.loading-line { font-size: 1rem; font-weight: 700; letter-spacing: 0.08em; margin: 0 0 8px; }
.loading-line::after {
  content: "";
  animation: dots 1.2s steps(4, end) infinite;
}
@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}
.loading-note { margin: 0; font-size: 0.76rem; font-style: italic; color: var(--ink-soft); }

/* error card */
.error-card { text-align: center; }
.error-card .stamp { position: static; display: inline-block; margin: 18px 0 6px; }
.error-card .chip {
  color: var(--ink);
  border-color: var(--ink-soft);
}
.error-card .chip:hover {
  color: var(--card);
  background: var(--ink);
  border-color: var(--ink);
}

/* clarify card ("which one did you mean?") */
.clarify-card { text-align: center; padding-top: 6px; }
.clarify-card .stamp { position: static; display: inline-block; margin: 14px 0 4px; }
.clarify-card .card-text { margin-bottom: 18px; }

.candidate-list {
  margin: 0 auto;
  padding: 0;
  list-style: none;
  max-width: 480px;
  text-align: left;
}
.candidate-list li + li { margin-top: 8px; }

.candidate {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  font-family: var(--type);
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 3px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 130ms ease, color 130ms ease;
}
.candidate:hover { background: var(--ink); color: var(--card); }
.candidate:active { transform: translateY(1px); }
.candidate strong { font-size: 0.98rem; }
.cand-by { font-size: 0.76rem; color: var(--ink-soft); }
.candidate:hover .cand-by { color: var(--card-edge); }

/* ---------- shelf ---------- */

.shelf {
  max-width: 1060px;
  margin: 44px auto 0;
  padding: 0 20px;
}

.shelf-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--on-desk-dim);
  border-bottom: 1px solid rgba(163, 187, 169, 0.3);
  padding-bottom: 10px;
  margin: 0 0 18px;
}

.shelf-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.shelf-card {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--card-edge);
  border-radius: 3px;
  padding: 12px 14px 12px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
  transform: rotate(-0.5deg);
  transition: translate 140ms ease, box-shadow 140ms ease;
  font-family: var(--type);
}
.shelf-card:nth-child(even) { transform: rotate(0.5deg); }
.shelf-card:hover { translate: 0 -3px; box-shadow: 0 12px 22px rgba(0, 0, 0, 0.42); }

.shelf-card .s-title {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.25;
  margin-bottom: 2px;
}
.shelf-card .s-author { display: block; font-size: 0.72rem; color: var(--ink-soft); margin-bottom: 8px; }

.s-verdict {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  padding: 2px 7px 1px;
  transform: rotate(-3deg);
  mix-blend-mode: multiply;
}
.s-verdict.stamp-read { color: var(--stamp-read); }
.s-verdict.stamp-skip { color: var(--stamp-skip); }
.s-verdict.stamp-depends { color: var(--stamp-depends); }

/* ---------- colophon ---------- */

.colophon {
  max-width: 760px;
  margin: 64px auto 0;
  padding: 0 20px 46px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 22px;
  align-items: start;
}

.bid-panel {
  border: 1px solid rgba(217, 164, 65, 0.4);
  border-radius: 4px;
  padding: 18px 20px;
  background: rgba(0, 0, 0, 0.14);
}
.bid-panel h3 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--lamp);
}
.bid-rules { margin: 0 0 14px; font-size: 0.76rem; color: var(--on-desk-dim); }

.bid-cta {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--desk-deep);
  background: var(--lamp);
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 3px;
  display: inline-block;
}
.bid-cta:hover { background: #e5b558; }

.fineprint {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.68rem;
  color: rgba(163, 187, 169, 0.66);
  margin: 10px 0 0;
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .masthead { padding-top: 40px; }
  .drawer { flex-direction: column; gap: 8px; padding: 10px; }
  .btn-primary { width: 100%; }
  .verdict-card { padding: 14px 16px 16px; }
  .stamp { right: 8px; top: 34px; }
  .card-head { padding-bottom: 40px; }
  .colophon { grid-template-columns: 1fr; }
  .ad-square { margin: 0 auto; }
}

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