@font-face {
  font-family: "Picnic Club";
  src: url("fonts/ThePicnicClub-ExtraBold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

/* Dream Books - Library Holds. Scoped under .dbh.
   Two neutrals plus one accent; spacing instead of borders and dividers. */

.dbh {
  --ink: #241f20;
  --muted: #574f51;
  --accent: #005da7;
  --bg: #faf6ec;
  --field: #ffffff;
  --coral: #f58c7d;
  --gold: #efae1b;
  --line: #ddd5c4;
  --display: Thepicnicclub, "Picnic Club", Georgia, serif;
  background: var(--bg);
  color: var(--ink);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.dbh *, .dbh *::before, .dbh *::after { box-sizing: border-box; }
.dbh h1, .dbh h2, .dbh h3, .dbh p { font-family: inherit; color: var(--ink); text-transform: none; letter-spacing: normal; }
.dbh ul, .dbh ol { list-style: none; margin: 0; padding: 0; }
.dbh li { list-style: none; margin: 0; }
.dbh a { color: var(--accent); text-decoration: none; }
.dbh a:hover { text-decoration: underline; }
.dbh button, .dbh input, .dbh select { font: inherit; color: inherit; }

.dbh-wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* intro */
.dbh-intro { padding: 24px 0 8px; }
.dbh .dbh-logo { display: inline-block; margin: 0 0 36px; line-height: 0; }
.dbh .dbh-logo img { display: block; height: 34px; width: auto; }
.dbh .dbh-intro h1 { font-family: var(--display); font-size: clamp(32px, 4.6vw, 46px); font-weight: 700; line-height: 1.1; color: var(--accent); margin: 0 0 14px; }
.dbh-intro p { margin: 0 0 8px; max-width: 680px; color: var(--muted); font-size: 18px; }
.dbh .dbh-markets { font-size: 16px; margin-top: 4px; }
.dbh .dbh-markets a { font-weight: 600; }
.dbh .dbh-stale { font-size: 15px; color: #9a3b2e; font-weight: 600; }

/* filters */
.dbh-filters { padding: 24px 0 8px; }
.dbh-filter-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.dbh-search {
  display: block; width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
  padding: 0 15px; margin: 0 0 16px; font-size: 16px; line-height: 44px;
  -webkit-appearance: none; appearance: none;
}
.dbh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px 16px; }
.dbh-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dbh-field label { font-size: 14px; font-weight: 600; color: var(--ink); }
/* Same height for every control in every browser: Safari ignores height on
   native selects, so selects are drawn by hand with their own arrow. */
.dbh-field select, .dbh-field input {
  display: block; width: 100%; height: 44px; min-height: 0; margin: 0;
  border: 1px solid var(--line); border-radius: 6px; background-color: #fff;
  padding: 0 11px; font-size: 15px; line-height: 42px;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
.dbh-field select {
  padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23574f51' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 8px;
}
.dbh-field input::-webkit-calendar-picker-indicator { opacity: 0.6; }
.dbh-field input[list]::-webkit-calendar-picker-indicator { display: none !important; }
.dbh-search::-webkit-search-decoration { -webkit-appearance: none; }
.dbh-search:focus, .dbh-field select:focus, .dbh-field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.dbh-field[hidden] { display: none; }
.dbh-textbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; }
.dbh-textbtn:hover { text-decoration: underline; }
.dbh-btn {
  display: inline-block; border: 0; border-radius: 6px; background: var(--accent); color: #fff;
  padding: 9px 16px; font-weight: 700; cursor: pointer;
}
.dbh-btn:hover { background: #004b87; }
.dbh .dbh-btn { color: #fff; }
.dbh .dbh-textbtn { color: var(--accent); font-weight: 600; }

/* results */
.dbh-list { padding: 16px 0 0; }
.dbh .dbh-row { display: grid; grid-template-columns: 44px 64px minmax(0, 1fr) auto; gap: 18px 22px; padding: 16px 0; align-items: center; }
.dbh-rank {
  width: 44px; height: 44px; border-radius: 22px; background: var(--gold); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1;
}
.dbh-rank--2d { font-size: 19px; }
.dbh-rank--3d { font-size: 15px; }
.dbh-cover { width: 64px; height: 96px; border-radius: 4px; object-fit: cover; background: #ebe5d6; display: block; }
.dbh-title { font-size: 19px; font-weight: 700; line-height: 1.3; margin: 0 0 4px; }
.dbh-meta { color: var(--muted); font-size: 15px; }
.dbh-meta button { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-align: left; }
.dbh-meta button:hover { color: var(--accent); text-decoration: underline; }
.dbh-stats { text-align: right; font-size: 15px; color: var(--muted); white-space: nowrap; line-height: 1.45; font-variant-numeric: tabular-nums; }
.dbh-stats strong, .dbh-stats span { display: block; }
.dbh-stats strong { font-size: 20px; color: var(--ink); font-weight: 700; }
.dbh .dbh-empty { padding: 32px 0; color: var(--muted); }
.dbh-clear { padding-top: 14px; }

/* pager */
.dbh-pager { display: flex; align-items: center; justify-content: flex-end; gap: 24px; padding: 24px 0 0; }
.dbh .dbh-pager .dbh-btn { padding: 13px 30px; font-size: 16px; font-weight: 700; border-radius: 8px; }
.dbh .dbh-pager .dbh-textbtn { font-weight: 600; }
.dbh-pager:empty { display: none; }

/* work with us */
.dbh-partners { padding: 48px 0 8px; }
.dbh-partners-panel { background: var(--bg); color: var(--ink); border: 2px solid var(--coral); border-radius: 14px; padding: 40px 40px 36px; }
.dbh .dbh-partners h2 { font-family: var(--display); font-weight: 700; font-size: clamp(32px, 4.2vw, 44px); line-height: 1.2; color: var(--ink); margin: 0 0 14px; }
.dbh-squiggle {
  color: var(--accent);
  background: url("squiggle.svg") repeat-x left 0 bottom 0.04em / 28px 8px;
  padding-bottom: 0;
}
.dbh .dbh-partners-lede { margin: 0 0 30px; max-width: 640px; color: var(--ink); font-size: 19px; font-weight: 600; }
.dbh-offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 36px; }
.dbh .dbh-offer h3 { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.2; color: var(--ink); margin: 0 0 6px; }
.dbh .dbh-offer p { margin: 0 0 14px; color: var(--ink); font-size: 16px; font-weight: 500; }
.dbh .dbh-offer a {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px;
  padding: 10px 16px; border-radius: 6px; text-decoration: none;
}
.dbh .dbh-offer a:hover { background: #004b87; }
.dbh .dbh-call { margin: 30px 0 0; font-size: 16px; color: var(--ink); font-weight: 500; }
.dbh .dbh-call a { color: var(--accent); font-weight: 700; text-decoration: none; }
.dbh .dbh-call a:hover { text-decoration: underline; }

.dbh-notes { padding: 32px 0 56px; font-size: 14px; }
.dbh-notes p { margin: 0; max-width: 720px; color: var(--muted); }

.dbh-loading { padding: 80px 0; text-align: center; color: var(--muted); }

@media (max-width: 640px) {
  .dbh .dbh-row { grid-template-columns: 34px 52px minmax(0, 1fr); gap: 4px 12px; }
  .dbh-stats { grid-column: 3; text-align: left; white-space: normal; margin-top: 2px; }
  .dbh-stats strong { display: inline; font-size: 15px; margin-right: 6px; }
  .dbh-stats span { display: inline; }
  .dbh-stats span + span::before { content: "\00a0\00b7\00a0"; }
  .dbh-rank { width: 34px; height: 34px; font-size: 17px; }
  .dbh-rank--2d { font-size: 15px; }
  .dbh-rank--3d { font-size: 12px; }
  .dbh-cover { width: 52px; height: 78px; }
  .dbh-filter-card { padding: 14px; }
  .dbh-grid { grid-template-columns: 1fr 1fr; }
  .dbh-offers { grid-template-columns: 1fr; }
  .dbh-partners-panel { padding: 28px 22px; border-radius: 10px; }
  .dbh .dbh-pager .dbh-btn { flex: 1; text-align: center; }
}
