:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #62666c;
  --line: #e7e4df;
  --paper: #fffdf9;
  --accent: #6e3f28;
  --accent-soft: #f3ebe4;
  --drawer-w: min(420px, 100vw);
  --shadow: 0 8px 24px #3c241216;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

body.drawer-open { overflow: hidden; }

.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

header { padding: 42px 0 28px; border-bottom: 1px solid var(--line); }

.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: .74rem;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -.02em;
}

h2 { margin: 0; font-family: Georgia, serif; line-height: 1.1; }

.lede { max-width: 720px; margin: 14px 0 0; color: var(--muted); }

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

/* —— Index board cards —— */
.board-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 18px;
  padding: 30px 0 46px;
}

.board-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform .16s ease, box-shadow .16s ease;
}

.board-card:hover,
.board-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  outline: none;
}

.board-card img,
.mosaic-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #f0ece6;
}

.board-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.board-card h2 { font-size: 1.24rem; }
.board-card p { margin: 0; color: var(--muted); font-size: .9rem; }

.meta {
  margin-top: auto;
  padding-top: 12px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}

/* —— Board page —— */
.board-header { padding: 30px 0 20px; }

.back {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--accent);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
}
.back:hover { text-decoration: underline; }

.board-header .art-note {
  max-width: 800px;
  margin: 12px 0 0;
  color: var(--muted);
}

.mosaic {
  display: block;
  width: min(100%, 1100px);
  max-height: 560px;
  object-fit: contain;
  object-position: center;
  margin: 10px auto 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f0ece6;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
  padding: 0 0 48px;
}

.tile {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  text-align: left;
  font: inherit;
  padding: 0;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}

.tile:hover,
.tile:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  outline: 2px solid #9b684b66;
  outline-offset: 2px;
}

.tile img,
.tile-img-ph {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #f1eee9;
}

.tile-copy {
  display: flex;
  min-height: 92px;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
}

.tile-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: .94rem;
  font-weight: 650;
  line-height: 1.25;
}

.tile-brand { color: var(--muted); font-size: .78rem; }

.tile-price {
  margin-top: auto;
  color: var(--accent);
  font-size: .9rem;
  font-weight: 750;
}

.empty { padding: 30px 0 60px; color: var(--muted); }

footer {
  padding: 22px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}

/* —— Product drawer —— */
.drawer-root {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

.drawer-root[hidden] { display: none !important; }

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 33, 36, 0.42);
  backdrop-filter: blur(2px);
  cursor: pointer;
  border: 0;
}

.drawer {
  position: relative;
  z-index: 1;
  width: var(--drawer-w);
  max-width: 100%;
  height: 100%;
  overflow-y: auto;
  background: #fff;
  box-shadow: -12px 0 40px #1a120c22;
  display: flex;
  flex-direction: column;
  animation: drawer-in .22s ease;
}

@keyframes drawer-in {
  from { transform: translateX(16px); opacity: .6; }
  to { transform: none; opacity: 1; }
}

.drawer-close {
  position: sticky;
  top: 0;
  align-self: flex-end;
  z-index: 2;
  margin: 10px 12px 0 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf9ee;
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.drawer-close:hover,
.drawer-close:focus-visible {
  background: var(--accent-soft);
  outline: 2px solid #9b684b66;
  outline-offset: 2px;
}

.drawer-body { padding: 0 22px 36px; }

.drawer-img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: #f1eee9;
  margin-bottom: 18px;
}

.drawer-meta { display: flex; flex-direction: column; gap: 6px; }

.drawer-board {
  margin: 0;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.drawer-meta h2 {
  font-size: 1.45rem;
  letter-spacing: -.01em;
}

.drawer-brand {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.drawer-price {
  margin: 4px 0 14px;
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 750;
}

.retailer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
  transition: filter .15s ease;
}
.retailer-btn:hover,
.retailer-btn:focus-visible {
  filter: brightness(1.08);
  outline: 2px solid #9b684b66;
  outline-offset: 2px;
}

/* Demand section — honest blanks */
.demand {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.demand-heading {
  margin: 0 0 12px;
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
}

.demand-empty {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  font-style: italic;
}

.demand-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demand-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  align-items: baseline;
  font-size: .9rem;
}

.demand-row dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.demand-row dd {
  margin: 0;
  font-weight: 650;
}

@media (max-width: 560px) {
  .wrap { width: min(100% - 22px, 1180px); }
  header { padding-top: 28px; }
  .board-list {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
  }
  .board-card-body { padding: 12px; }
  .board-card h2 { font-size: 1rem; }
  .board-card p { font-size: .78rem; }
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }
  .tile-copy { min-height: 106px; padding: 10px; }
  .drawer { width: 100%; }
  .drawer-body { padding: 0 16px 28px; }
  .demand-row { grid-template-columns: 96px 1fr; }
}

/* Demand strip under product tiles (also inlined in index.html) */
.demand-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
  padding: 0 10px 10px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fffdf9 0%, #f7f3ee 100%);
}
.ds-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  line-height: 1.15;
}
.ds-chip .ds-num {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.ds-chip .ds-label {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.ds-chip .ds-sub {
  font-size: .68rem;
  font-weight: 650;
  color: var(--accent);
}
.ds-reviews .ds-num { color: var(--accent); font-size: 1.2rem; }
.ds-meta {
  flex-direction: row;
  align-items: center;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .02em;
  padding: 8px 9px;
}
.ds-meta-active {
  background: var(--accent-soft);
  border-color: #d4b9a8;
  color: var(--accent);
}
.ds-meta-none { color: var(--muted); font-weight: 650; }
.ds-score {
  margin-left: auto;
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.ds-score .ds-num { color: #fff; font-size: 1.15rem; }
.ds-score .ds-label { color: #c9c6c1; }
.tile .tile-copy { padding-bottom: 10px; }
@media (max-width: 560px) {
  .demand-strip { padding: 0 8px 8px; gap: 5px; }
  .ds-chip { padding: 5px 7px; }
  .ds-reviews .ds-num { font-size: 1.05rem; }
  .ds-score { margin-left: 0; }
}

