/* Tom Heckbert Books: component styles. Uses the theme's color presets when present, with fallbacks. */
.th-books,.th-shop,.th-coupons,.th-wings,.th-grid{--thb-bronze:var(--wp--preset--color--bronze,#7A4E22);--thb-ink:var(--wp--preset--color--ink,#1F1D1A);--thb-graphite:var(--wp--preset--color--graphite,#5A544C);--thb-line:var(--wp--preset--color--limestone,#CFC6B8);--thb-stone:var(--wp--preset--color--stone,#E8E1D5);--thb-white:var(--wp--preset--color--white,#FFFDF8);--thb-paper:var(--wp--preset--color--parchment,#F4EFE6);--thb-display:var(--wp--preset--font-family--display,Georgia,serif)}
.th-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2.5rem clamp(1rem,2.5vw,2rem)}
@media(min-width:700px){.th-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:1000px){.th-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.th-grid.th-vitrine{grid-template-columns:repeat(3,minmax(0,1fr))}}
.th-vitrine{align-items:end}.th-vitrine .th-object:nth-child(2){transform:translateY(-1.5rem)}
.th-object{margin:0;display:flex;flex-direction:column}
.th-mount{display:block;background:var(--thb-white);padding:clamp(.6rem,1.5vw,1.1rem);box-shadow:0 1px 0 var(--thb-line),0 18px 30px -22px rgba(31,29,26,.45)}
.th-mount img,.th-cover-ph{display:block;width:100%;height:auto;aspect-ratio:5/8;object-fit:cover}
.th-object-lg{max-width:380px}
.th-cover-ph{box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;padding:12%;background:var(--thb-stone);border:1px solid var(--thb-line);color:var(--thb-graphite);font:600 .7rem/1.35 system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase}
.th-cover-ph::before{content:"";display:block;height:4px;width:40%;background:var(--thb-bronze)}
.th-cover-ph b{font:500 1.15rem/1.15 var(--thb-display);letter-spacing:0;text-transform:none;color:var(--thb-ink)}
.th-caption{display:flex;flex-direction:column;gap:.15rem;margin-top:.9rem;border-top:1px solid var(--thb-line);padding-top:.6rem}
.th-cat,.th-label{font-size:.7rem;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--thb-graphite,#5A544C)}
.th-cat,.th-label.is-bronze{color:var(--thb-bronze,#7A4E22)}
.th-object-title{font-family:var(--thb-display);font-size:1.2rem;font-weight:600;line-height:1.2;color:var(--thb-ink);text-decoration:none}
.th-object-title:hover{color:var(--thb-bronze)}
.th-meta{font-size:.82rem;color:var(--thb-graphite,#5A544C)}
.th-sale-tag{display:inline-block;font-size:.68rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#fff;background:var(--wp--preset--color--bronze,#7A4E22);padding:.25rem .5rem;width:fit-content}
.th-price{font-size:1.4rem;margin:.25rem 0 .75rem}.th-price s{color:var(--wp--preset--color--graphite,#5A544C);font-size:1rem;margin-right:.35rem}
.th-filters{display:flex;flex-wrap:wrap;gap:.5rem;list-style:none;margin:0 0 1rem;padding:0}
.th-filters button{font:600 .75rem/1 inherit;font-family:inherit;letter-spacing:.12em;text-transform:uppercase;padding:.75rem 1rem;min-height:44px;background:transparent;border:1px solid var(--wp--preset--color--limestone,#CFC6B8);color:inherit;cursor:pointer}
.th-filters button[aria-pressed=true]{background:var(--wp--preset--color--ink,#1F1D1A);border-color:var(--wp--preset--color--ink,#1F1D1A);color:var(--wp--preset--color--parchment,#F4EFE6)}
.th-series{margin:0 0 4rem}.th-series[hidden]{display:none}
.th-series-head{border-bottom:1px solid var(--thb-line);padding-bottom:1rem;margin-bottom:1.5rem}.th-series-head h2{margin:.2rem 0}.th-series-head p{margin:.2rem 0}
.th-wings{display:grid;gap:1px;background:var(--thb-line);border:1px solid var(--thb-line)}
@media(min-width:700px){.th-wings{grid-template-columns:repeat(2,1fr)}}@media(min-width:1000px){.th-wings{grid-template-columns:repeat(4,1fr)}}
.th-wing{display:flex;flex-direction:column;gap:.4rem;background:var(--thb-paper);padding:2.5rem 1.5rem;color:var(--thb-ink);text-decoration:none}
.th-wing:hover{background:var(--thb-white)}.th-wing-title{font-family:var(--thb-display);font-size:1.6rem;line-height:1.1}.th-wing-desc{color:var(--thb-graphite);font-size:.95rem}.th-wing .th-label:last-child{margin-top:auto;padding-top:1rem}
.th-buy{background:var(--wp--preset--color--white,#FFFDF8);border:1px solid var(--wp--preset--color--limestone,#CFC6B8);padding:1.5rem;margin-top:1.5rem}
.th-buy h2{font-size:1.5rem;margin:0 0 .25rem}
.th-store-buttons{display:flex;flex-wrap:wrap;gap:.6rem}
.th-soon .wp-block-button__link{background:transparent!important;color:var(--wp--preset--color--graphite,#5A544C)!important;border:1px dashed var(--wp--preset--color--limestone,#CFC6B8)!important;cursor:default;pointer-events:none}
.th-coupon-inline{border:1px dashed var(--wp--preset--color--gold,#C9A458);padding:.75rem 1rem;margin:0 0 1rem}.th-coupon-inline p{margin:.4rem 0 0;font-size:.9rem}
.th-buy code,.th-shop code,.th-promo code,.th-coupon-inline code{font-family:ui-monospace,Menlo,monospace;font-weight:700;letter-spacing:.08em;background:transparent;padding:0}
.th-copy,.th-print-btn{font:600 .7rem/1 system-ui,sans-serif;letter-spacing:.1em;text-transform:uppercase;padding:.55rem .8rem;min-height:36px;border:1px solid currentColor;background:transparent;color:inherit;cursor:pointer}
.th-dl,.th-facts{display:grid;grid-template-columns:auto 1fr;gap:.45rem 1.5rem;margin:1.5rem 0;font-size:.95rem;border-top:1px solid var(--wp--preset--color--limestone,#CFC6B8);padding-top:1rem}
.th-facts dt{font-size:.7rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--wp--preset--color--graphite,#5A544C);line-height:1.8}.th-facts dd{margin:0}
.th-shop-group{margin:0 0 3rem}.th-shop-group h2{margin:0 0 .5rem}
.th-shop-row{display:grid;gap:.6rem;align-items:center;border-bottom:1px solid var(--thb-line);padding:1rem 0}
@media(min-width:800px){.th-shop-row{grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto}}
.th-shop-title a{font-family:var(--thb-display);font-size:1.25rem;font-weight:600;color:var(--thb-ink);text-decoration:none;display:block}
.th-shop-title a:hover{color:var(--thb-bronze)}.th-shop-price .th-price{font-size:1.1rem;margin:0}
.th-shop .wp-block-button__link{font-size:.7rem;padding:.65rem .85rem}
.th-hidden-note{background:#fff3cd;color:#5c4400;padding:.5rem .75rem;font-size:.85rem;font-weight:600}
.th-promo{background:var(--wp--preset--color--night,#1E2430);color:var(--wp--preset--color--parchment,#F4EFE6);text-align:center;font-size:.9rem;padding:.6rem 1rem}
.th-promo p{margin:0;display:flex;flex-wrap:wrap;gap:.5rem 1rem;justify-content:center;align-items:center}
.th-promo a{color:var(--wp--preset--color--gold,#C9A458);font-weight:600}.th-promo code{color:var(--wp--preset--color--gold,#C9A458)}
.th-coupons{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:1.5rem}
.th-coupon-card{background:var(--thb-white);border:2px dashed var(--wp--preset--color--gold,#C9A458);outline:1px solid var(--thb-line);outline-offset:6px;padding:1.75rem 1.5rem;text-align:center;break-inside:avoid}
.th-coupon-kicker{font-size:.7rem;font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:var(--thb-bronze);margin:0}
.th-coupon-card h3{font-family:var(--thb-display);font-size:1.4rem;margin:.4rem 0}
.th-coupon-code code{display:inline-block;font:700 1.6rem/1 ui-monospace,Menlo,monospace;letter-spacing:.12em;border:1px solid var(--thb-ink);padding:.6rem 1rem;margin:.5rem 0;background:transparent;color:var(--thb-ink)}
.th-coupon-note{font-size:.9rem;color:var(--thb-graphite)}.th-coupon-actions{display:flex;gap:1rem;justify-content:center;align-items:center;flex-wrap:wrap}
.th-coupon-site{font-size:.7rem;letter-spacing:.16em;text-transform:uppercase;color:var(--thb-graphite);margin:.75rem 0 0}
@media print{body *{visibility:hidden}.th-coupons,.th-coupons *{visibility:visible}.th-coupons{position:absolute;inset:0 auto auto 0;width:100%}.th-copy,.th-coupon-link,.th-print{display:none}}
.th-mount:focus-visible,.th-filters button:focus-visible,.th-copy:focus-visible,.th-wing:focus-visible{outline:2px solid var(--wp--preset--color--bronze,#7A4E22);outline-offset:3px}
@media(prefers-reduced-motion:no-preference){.th-mount{transition:transform .3s}.th-object:hover .th-mount{transform:translateY(-3px)}}
.th-share{margin:3rem 0 0;border-top:1px solid var(--wp--preset--color--limestone,#CFC6B8);padding-top:1rem}
.th-share ul,.th-social ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.5rem 1.25rem;align-items:center}
.th-share a,.th-social a{font-size:.75rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase}
.th-social-heading{font-size:1.4rem;margin:0 0 .75rem}

/* ---------- Optional modules ---------- */
.th-magnet { max-width: 46rem; margin-inline: auto; text-align: center; border: 1px solid var(--wp--preset--color--bronze, #8a6a3b); padding: clamp(1.5rem, 4vw, 3rem); background: var(--wp--preset--color--parchment, #f7f3ea); }
.th-magnet .wp-block-buttons { justify-content: center; }
.th-magnet-dl { margin-top: 1rem; font-size: .95rem; }
.th-label-list { list-style: none; padding: 0; border-top: 1px solid currentColor; }
.th-label-list li { display: flex; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid rgba(0,0,0,.12); font-size: .95rem; }
.th-label-list strong { min-width: 9rem; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.th-az ul { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; padding: 0; margin: 0 0 2rem; }
.th-az a, .th-az span { display: inline-block; min-width: 2.2rem; padding: .35rem 0; text-align: center; border: 1px solid rgba(0,0,0,.15); }
.th-az span { opacity: .35; }
.th-gloss-letter h2 { border-bottom: 1px solid var(--wp--preset--color--bronze, #8a6a3b); }
.th-glossary dt { font-weight: 600; margin-top: 1rem; scroll-margin-top: 5rem; }
.th-glossary dd { margin: .25rem 0 0; }
.th-reviews { max-width: 46rem; margin: 2.5rem auto 0; }
.th-review { margin: 0 0 1.5rem; }
.th-review blockquote { margin: 0; font-family: var(--wp--preset--font-family--display, serif); font-style: italic; font-size: 1.35rem; line-height: 1.4; }
.th-review figcaption { margin-top: .4rem; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.th-contact { max-width: 36rem; }
.th-contact label { display: block; font-weight: 600; margin-bottom: .3rem; }
.th-contact input, .th-contact textarea { width: 100%; box-sizing: border-box; padding: .7rem; border: 1px solid #77706a; background: #fff; font: inherit; }
.th-contact input:focus-visible, .th-contact textarea:focus-visible { outline: 3px solid var(--wp--preset--color--bronze, #8a6a3b); outline-offset: 2px; }
.th-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.th-form-msg { padding: .8rem 1rem; border-left: 4px solid var(--wp--preset--color--bronze, #8a6a3b); background: var(--wp--preset--color--stone, #ece6da); }
.th-notice { position: fixed; z-index: 999; inset: auto 1rem 1rem 1rem; max-width: 34rem; margin-inline: auto; padding: 1rem 1.25rem; background: var(--wp--preset--color--ink, #1f1b16); color: #fff; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.th-notice[hidden] { display: none; }
.th-notice p { margin: 0; font-size: .9rem; }
.th-notice a { color: inherit; }
.th-notice button { font: inherit; font-size: .85rem; padding: .45rem .9rem; cursor: pointer; border: 1px solid #fff; background: transparent; color: #fff; }
.th-notice button:first-child { background: var(--wp--preset--color--gold, #c9a45c); color: #1f1b16; border-color: transparent; }
@media print { .th-notice { display: none; } }

/* ---------- Wiki ---------- */
.th-wiki-search label { display: block; font-weight: 600; margin-bottom: .4rem; }
.th-wiki-search div { display: flex; gap: .5rem; max-width: 36rem; }
.th-wiki-search input[type=search] { flex: 1; min-width: 0; padding: .7rem; border: 1px solid #77706a; background: #fff; font: inherit; }
.th-wiki-search input:focus-visible { outline: 3px solid var(--wp--preset--color--bronze, #8a6a3b); outline-offset: 2px; }
.th-wiki-topics { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.th-wiki-topics li { background: var(--wp--preset--color--parchment, #f7f3ea); border: 1px solid rgba(0,0,0,.12); padding: 1.25rem; }
.th-wiki-topics a { display: flex; flex-direction: column; gap: .3rem; text-decoration: none; }
.th-wiki-topic { font-family: var(--wp--preset--font-family--display, serif); font-size: 1.5rem; line-height: 1.2; }
.th-wiki-topics p { margin: .5rem 0 0; font-size: .95rem; }
.th-wiki-group h3 { border-bottom: 1px solid var(--wp--preset--color--bronze, #8a6a3b); scroll-margin-top: 5rem; }
.th-wiki-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.th-wiki-list li { padding: .45rem 0; border-bottom: 1px solid rgba(0,0,0,.08); }
.th-wiki-list li span { display: block; font-size: .9rem; opacity: .8; }
.th-crumbs ol { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .25rem .5rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.th-crumbs li + li::before { content: "/"; margin-right: .5rem; opacity: .5; }
.th-wiki-meta { margin-top: .25rem; }
.th-toc { border-top: 2px solid var(--wp--preset--color--bronze, #8a6a3b); padding-top: .75rem; font-size: .95rem; }
.th-toc summary { cursor: pointer; }
.th-toc ol { padding-left: 1.1rem; margin: .5rem 0 0; }
.th-toc ol ol { margin: .2rem 0 .3rem; }
.th-toc li { margin: .25rem 0; }
.th-wiki .wp-block-post-content :is(h2, h3) { scroll-margin-top: 5rem; }
.th-wiki-related { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid rgba(0,0,0,.15); }
/* Wiki images (1.3.3): lead figure on a white mount with a collection-label caption, list thumbnails */
.th-wiki-figure { margin: 0 0 2rem; }
.th-wiki-figure img { display: block; width: 100%; max-width: 100%; height: auto; max-height: min(70vh, 560px); object-fit: contain; box-sizing: border-box; background: var(--wp--preset--color--white, #fffdf8); padding: clamp(.6rem, 1.5vw, 1.1rem); box-shadow: var(--wp--custom--shadow--mount, 0 1px 2px rgba(31,29,26,.08), 0 10px 24px -12px rgba(31,29,26,.25)); }
.th-wiki-figcaption { margin-top: .9rem; padding-top: .6rem; border-top: 1px solid var(--th-line, #cfc6b8); font-size: .85rem; line-height: 1.5; color: var(--wp--preset--color--graphite, #5a544c); text-align: left; }
.th-wiki-list li.th-wiki-item { display: flex; align-items: flex-start; gap: .9rem; padding: .6rem 0; }
.th-wiki-item-txt { flex: 1; min-width: 0; }
.th-wiki-thumb { flex: 0 0 auto; display: block; width: 56px; height: 56px; overflow: hidden; background: var(--wp--preset--color--white, #fffdf8); border: 1px solid var(--th-line, #cfc6b8); box-sizing: border-box; padding: 3px; }
.th-wiki-thumb.is-empty { background: var(--wp--preset--color--stone, #e8e1d5); }
.th-wiki-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.th-wiki-related .th-wiki-thumb { width: 64px; height: 64px; }
.th-wiki-loop-thumb { float: right; display: block; width: clamp(72px, 18vw, 120px); aspect-ratio: 1; margin: 0 0 .75rem 1.25rem; overflow: hidden; background: var(--wp--preset--color--white, #fffdf8); padding: 4px; box-sizing: border-box; box-shadow: var(--wp--custom--shadow--mount, 0 1px 2px rgba(31,29,26,.08), 0 10px 24px -12px rgba(31,29,26,.25)); }
.th-wiki-loop-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.th-blog-item:has(.th-wiki-loop-thumb) { display: flow-root; }
@media (prefers-reduced-motion: no-preference) { .th-wiki-thumb img, .th-wiki-loop-thumb img { transition: transform .3s ease; } .th-wiki-item:hover .th-wiki-thumb img, .th-blog-item:hover .th-wiki-loop-thumb img { transform: scale(1.04); } }
@media print { .th-wiki-thumb, .th-wiki-loop-thumb { display: none; } }
@media (min-width: 782px) {
	.th-wiki-cols > .wp-block-column:first-child { order: 2; position: sticky; top: 2rem; align-self: flex-start; }
}
@media print { .th-toc, .th-wiki-search, .th-crumbs { display: none; } }
