/*
Theme Name: Poetry in Plastic
Theme URI: https://example.com/
Author: Poetry in Plastic
Description: A warm, personal board game review theme. Reviews with a game details sidebar, expansion reviews that link both ways, Best Board Games lists, guides, a Find a Game filter, and site search.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: poetry-in-plastic
*/

:root {
  --ink: #2b2622;
  --bg: #fbf6ec;
  --card: #fffdf8;
  --soft: #f3eadb;
  --line: #eadfca;
  --red: #b4572e;
  --teal: #3f6b57;
  --gold: #d9a441;
  --hero: #3a3129;
  --on-accent: #fffdf8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1e8d8;
    --bg: #1c1814;
    --card: #26211b;
    --soft: #2c261f;
    --line: #3a3229;
    --red: #e0916a;
    --teal: #8fc2a7;
    --hero: #14110e;
    --on-accent: #1c1814;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.7 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, .serif, .logo, .num, .rate em, .rb em { font-family: 'Young Serif', Georgia, serif; font-weight: 400; }
h1 { font-size: clamp(26px, 4.5vw, 38px); line-height: 1.2; letter-spacing: -.01em; margin: 12px 0 18px; }
h2 { line-height: 1.3; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--card); padding: 8px 12px; z-index: 100; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 20px 56px; }
.narrow { max-width: 760px; }
.pad { padding: 20px; }
.fine { font-size: 13px; opacity: .75; margin: 6px 2px 14px; }
.h-top { margin-top: 0; }

/* Header */
.site-head { background: var(--bg); border-bottom: 1px solid var(--line); }
.nav { max-width: 1100px; margin: 0 auto; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; text-decoration: none; color: var(--ink); }
.logo .wm { position: relative; display: inline-block; font-size: 26px; line-height: 1.2; padding-bottom: 8px; letter-spacing: -.005em; }
.logo .wm em { font-style: italic; color: var(--red); font-size: .85em; }
.logo .wm::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; opacity: .55;
  background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6' preserveAspectRatio='none'%3E%3Cpath d='M1 4 Q28 7 50 3 T99 3' fill='none' stroke='%23c4693e' stroke-width='1.6' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
.srch { position: relative; flex: 1; min-width: 220px; max-width: 360px; margin: 0 8px; }
.srch input { width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 8px 16px; }
.sd { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; margin-top: 8px; max-height: 340px; overflow: auto; }
.sd[hidden] { display: none; }
.sd a { display: flex; gap: 8px; align-items: center; padding: 9px 14px; text-decoration: none; font-size: 14px; border-bottom: 1px solid var(--line); }
.sd a:last-child { border: 0; }
.sd a:hover { background: var(--soft); }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.nav-list a { display: block; text-decoration: none; font-weight: 500; padding: 6px 14px; border-radius: 99px; }
.nav-list .current-menu-item > a, .nav-list a:hover { background: var(--soft); }

/* Shared blocks */
.box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.box > .hd { color: var(--teal); font-weight: 700; font-size: 14px; padding: 16px 20px 0; }
.tag { display: inline-block; background: var(--soft); color: var(--teal); font: 700 12px 'DM Sans', system-ui, sans-serif; letter-spacing: .03em; padding: 4px 12px; border-radius: 99px; }
.btn { display: inline-block; background: var(--teal); color: var(--on-accent); border: 0; border-radius: 99px; font: 600 14px 'DM Sans', system-ui, sans-serif; padding: 11px 22px; text-decoration: none; cursor: pointer; }
.btn:hover { opacity: .9; }
.sec { margin: 32px 0 12px; font-size: 24px; }
.more { margin: 8px 0 0; font-weight: 500; }
.crumb { font-size: 13px; opacity: .8; margin-bottom: 10px; }
.crumb a { text-underline-offset: 3px; }
.pill { font: 700 10px 'DM Sans', system-ui, sans-serif; letter-spacing: .06em; color: var(--teal); background: var(--soft); border-radius: 99px; padding: 3px 12px; flex: none; }
.dots i { display: inline-block; width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--ink); margin-left: 3px; vertical-align: -2px; }
.dots i.f { background: var(--red); border-color: var(--red); }

/* Cards */
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 8px; }
.rc, .sc-card { text-decoration: none; color: inherit; display: block; }
a.box:hover, .item:hover { border-color: var(--teal); }
.rc .top { height: 130px; background: var(--soft); position: relative; }
.rc .top:empty::after { content: "★"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; color: var(--line); }
.rc .top img { width: 100%; height: 100%; object-fit: cover; }
.rc .t { padding: 14px 16px 16px; }
.rc small { font: 700 10px 'DM Sans', system-ui, sans-serif; letter-spacing: .05em; opacity: .65; text-transform: uppercase; }
.rc b { display: block; font-family: 'Young Serif', Georgia, serif; font-weight: 400; font-size: 16px; line-height: 1.35; margin-top: 3px; }
.sc { display: inline-block; color: var(--red); font-weight: 700; font-size: 14px; margin-top: 8px; }
.wn { margin-left: 10px; font-weight: 700; font-size: 12px; color: var(--teal); }
.sc-card h3 { margin: 0 0 6px; font-size: 18px; }
.sc-card small { opacity: .8; }

/* Home lead */
.lead { margin-bottom: 8px; }
.lead-img { display: block; background: var(--soft); aspect-ratio: 16 / 8; }
.lead-img img { width: 100%; height: 100%; object-fit: cover; }
.lead-title { font-size: clamp(24px, 3.6vw, 32px); margin: 10px 0 12px; }
.lead-title a { text-decoration: none; }
.rb { display: flex; gap: 12px; align-items: center; margin: 0 0 12px; }
.rb em { font-style: normal; font-size: 20px; color: var(--red); border: 1.5px solid var(--red); min-width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; }
.by-line { display: block; opacity: .75; margin-bottom: 4px; }

/* Layout: filter side panel and review grid */
.shell { display: grid; grid-template-columns: 270px 1fr; gap: 26px; align-items: start; }
.side { position: sticky; top: 12px; }
#mm-ft { display: none; }
.side .pad { padding: 16px 18px; }
.fg { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.fg label, .fg legend { display: flex; justify-content: space-between; font-weight: 700; font-size: 13px; margin-bottom: 6px; padding: 0; }
.fg label span { color: var(--red); }
.fg input[type=search] { width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; }
.fg input[type=range] { width: 100%; accent-color: var(--red); height: 22px; }
.fg .ck { display: flex; justify-content: flex-start; gap: 8px; align-items: center; font-weight: 400; font-size: 14px; margin: 3px 0; }
.go { width: 100%; text-align: center; }
.reset { display: block; text-align: center; font-size: 13px; margin-top: 10px; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; }
  #mm-ft { display: block; width: 100%; margin-bottom: 12px; }
  #mm-filters { display: none; }
  .side.open #mm-filters { display: block; }
}

/* Review page */
.grid { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }
.hero { background: var(--hero); border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 10; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero-guide { margin: 4px 0 18px; }
.hero-empty .serif { display: block; font-size: clamp(28px, 5vw, 44px); color: #f2e8d5; margin-bottom: 6px; }
.hero-empty p { margin: 0; font-size: 13px; opacity: .8; }
.hero-empty { display: grid; place-items: center; text-align: center; color: #d9cdb8; padding: 20px; }
.by { display: flex; gap: 12px; align-items: center; margin: 16px 0 14px; }
.av { width: 42px; height: 42px; border-radius: 50%; background: var(--teal); color: var(--on-accent); display: grid; place-items: center; font-size: 15px; }
.by small { display: block; opacity: .7; font-size: 13px; }
.by a { text-underline-offset: 3px; }
.disc { margin: 0 0 18px; font-size: 14px; padding: 10px 14px; background: var(--soft); border-radius: 12px; }
.note { margin-bottom: 20px; }
.fx { padding: 14px 18px; font-size: 14px; }
.fx p { margin: 8px 0 0; opacity: .85; }
.rate { display: flex; gap: 16px; align-items: flex-start; padding: 18px; margin: 0 0 20px; background: var(--soft); border: 0; }
.rate em { font-style: normal; font-size: 20px; color: #fff; background: var(--red); min-width: 64px; height: 64px; display: grid; place-items: center; border-radius: 14px; flex: none; }
@media (prefers-color-scheme: dark) { .rate em { color: var(--bg); } }
.rate p { margin: 4px 0 0; }
.rn { margin-top: 8px; font-size: 13px; }
.rn summary, .jt summary { cursor: pointer; color: var(--teal); font-weight: 700; }
.review .body { padding: 8px 24px 24px; }
.jt { font-size: 14px; margin: 12px 0 6px; }
.jl { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
.jl a { text-decoration: underline; text-underline-offset: 3px; }
.entry { font-size: 17px; line-height: 1.8; }
.entry h2 { font-size: 22px; margin: 28px 0 8px; }
.entry h3 { font-size: 19px; margin: 22px 0 6px; }
.entry p { margin: 0 0 16px; }
.entry img { border-radius: 12px; }
.entry figure { margin: 20px 0; }
.entry figcaption { font-size: 13px; opacity: .75; margin-top: 6px; }
.entry a { color: var(--teal); }

.rows { padding: 6px 18px 12px; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1.5px dotted var(--line); font-size: 14px; }
.row:last-child { border: 0; }
.row > span { opacity: .7; white-space: nowrap; }
.row b { text-align: right; font-weight: 500; }
.row small.sub { display: block; opacity: .7; font-size: 12px; font-weight: 400; }
.col-side .box { margin-bottom: 14px; }
.how { margin-top: 20px; }
.side-h { font-size: 20px; margin: 26px 0 10px; }
.item { display: flex; gap: 12px; align-items: center; padding: 10px 14px; text-decoration: none; color: inherit; }
.item > div:not(.thumb) { flex: 1; line-height: 1.35; }
.item small { display: block; opacity: .7; font-size: 12px; }
.thumb { width: 46px; height: 46px; border-radius: 12px; background: var(--soft); color: var(--red); display: grid; place-items: center; font-size: 22px; flex: none; }
.hex { width: 38px; height: 38px; flex: none; display: grid; place-items: center; color: var(--on-accent); background: var(--ink); border-radius: 50%; font: 700 14px 'DM Sans', sans-serif; }

/* Lists and guides */
.lst { display: flex; gap: 12px; padding: 14px 16px; margin-bottom: 12px; text-decoration: none; align-items: flex-start; }
.num { font-size: 22px; color: var(--red); margin-right: 8px; }
.quick { margin: 0 0 22px; background: var(--soft); border: 0; }

/* Pagination */
.pagination { margin: 24px 0 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { padding: 6px 14px; border-radius: 99px; background: var(--soft); text-decoration: none; }
.page-numbers.current { background: var(--teal); color: var(--on-accent); }

/* Footer */
.site-foot { background: var(--soft); padding: 28px 20px; text-align: center; font-size: 14px; }
.foot-links { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.foot-links a { color: var(--teal); }
.legal { margin: 4px 0; opacity: .7; font-size: 13px; }

/* Best for tags, cards, home shortcuts */
.aud { margin: 8px 0 0 !important; display: flex; flex-wrap: wrap; gap: 6px; }
.aud a { font-size: 12px; font-weight: 700; color: var(--teal); background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; text-decoration: none; }
.aud a:hover { border-color: var(--teal); }
.rc-for { display: block; margin-top: 6px; font-size: 12px; opacity: .75; }
.for-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 8px; }
.for { padding: 14px 16px; text-decoration: none; font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.for:hover { border-color: var(--teal); }

/* Quick facts strip (phones only: the full table sits in the sidebar on desktop) */
.qf { display: none; }
.nw { white-space: nowrap; }

/* Phones */
@media (max-width: 860px) {
  .qf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding: 12px 16px; margin: 0 0 20px; font-size: 14px; }
  .qf div { display: flex; flex-direction: column; }
  .qf small { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .65; }
  .qf a { margin-left: auto; font-weight: 600; color: var(--teal); padding: 8px 0; }
}
@media (max-width: 600px) {
  body { overflow-wrap: break-word; }
  /* Header: logo and search on top, menu in one swipeable row */
  .nav { padding: 12px 16px; gap: 8px; }
  .logo .wm { font-size: 23px; }
  .site-head nav, .nav > nav { width: 100%; }
  .nav-list { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-list li { flex: none; }
  .nav-list { gap: 0; }
  .nav-list a { padding: 11px 8px; font-size: 14px; white-space: nowrap; }
  /* Easier to tap */
  .crumb a { display: inline-block; padding: 8px 2px; }
  .foot-links { gap: 0 4px; }
  .foot-links a { display: inline-block; padding: 10px 8px; }
  .more a, .jl a { display: inline-block; padding: 10px 0; }
  .aud a { padding: 7px 14px; font-size: 13px; }
  .rn summary, .jt summary { padding: 8px 0; }
  .btn { padding: 13px 24px; }
  .pagination .page-numbers { padding: 10px 16px; }
  /* Cards: smaller pictures so a page does not scroll forever */
  .related { grid-template-columns: 1fr; gap: 12px; }
  .rc .top { height: 100px; }
  .rc .t { padding: 12px 14px 14px; }
  .sc-card { padding: 16px; }
  /* Review page */
  .review .body { padding: 6px 18px 20px; }
  .entry { font-size: 17px; line-height: 1.75; }
  .entry h2 { font-size: 21px; }
  .rate { padding: 16px; gap: 12px; }
  .rate em { min-width: 56px; height: 56px; font-size: 18px; }
  .row { font-size: 14px; }
  .lst { padding: 14px; gap: 8px; }
  .lst .num { margin-right: 2px; }
  /* Filters: two columns of checkboxes and a button that stays in view */
  .fg .ck { padding: 6px 0; margin: 0; }
  .side.open #mm-filters { max-height: none; }
  .gobar { position: sticky; bottom: 0; margin: 0 -18px; padding: 10px 18px; background: var(--card); border-top: 1px solid var(--line); }
  .gobar .go { margin: 0; }
}

/* Team and author pages */
.portrait { display: block; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--teal); flex: none; }
.portrait img, .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait.ph { display: grid; place-items: center; color: var(--on-accent); font: 400 32px 'Young Serif', Georgia, serif; }
.portrait.big { width: 160px; height: 160px; }
.portrait.big.ph { font-size: 52px; }
.av { overflow: hidden; flex: none; }
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 28px 0 4px; }
.person { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 24px 18px 20px; text-decoration: none; color: inherit; }
.person:hover { border-color: var(--teal); }
.person .serif { font-size: 20px; margin-top: 8px; font-weight: 400; }
.person small { color: var(--teal); font-weight: 700; font-size: 13px; }
.pbio { font-size: 14px; line-height: 1.6; opacity: .85; }
.pmore { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--teal); }
.ahead { display: flex; gap: 28px; align-items: flex-start; padding: 28px; }
.ahead h1 { margin: 0 0 4px; }
.arole { margin: 0 0 14px; color: var(--teal); font-weight: 700; }
.abio p { margin: 0 0 12px; line-height: 1.75; }
.afav { margin: 8px 0 0; font-size: 14px; }
@media (max-width: 600px) {
  .ahead { flex-direction: column; align-items: center; text-align: center; padding: 24px 18px; gap: 16px; }
  .portrait.big { width: 130px; height: 130px; }
  .team { grid-template-columns: 1fr; }
}
.entry a.person, .entry a.person:hover { color: var(--ink); text-decoration: none; }
.entry a.person small, .entry a.person .pmore { color: var(--teal); }
