/* Bridge for templates that still use the parent theme's markup (hubs, archives,
   pages, tools, search, 404). Maps the parent's light styles onto the theme tokens
   so every page shares the Home look in dark and light mode. */

/* Title boxes */
body.pkc .space-title-box,
body.pkc .space-archive-title-box {
  background:
    radial-gradient(800px 320px at 85% 0%, color-mix(in srgb, var(--primary) 75%, transparent), transparent 70%),
    var(--surface);
  border-bottom: 1px solid var(--border);
  padding-block: clamp(1.5rem, 3vw, 2.6rem);
}
body.pkc .space-title-box h1,
body.pkc .space-archive-title-box h1,
body.pkc .space-title-box-h1 h1,
body.pkc .space-archive-title-box-h1 h1 { color: var(--text); font: 600 clamp(1.9rem, 3.8vw, 3rem)/1.12 var(--font-head); letter-spacing: -.015em; margin: 0; }
body.pkc .space-title-box-h1,
body.pkc .space-archive-title-box-h1,
body.pkc .space-page-content-excerpt,
body.pkc .space-taxonomy-description,
body.pkc .space-taxonomy-description p { color: var(--muted); }
body.pkc .space-title-box-category a,
body.pkc .space-breadcrumbs a,
body.pkc .space-single-aces-breadcrumbs a { color: var(--secondary-text); }
body.pkc .space-breadcrumbs, body.pkc .space-breadcrumbs span { color: var(--muted); }

/* Page and archive wrappers */
body.pkc .space-page-section,
body.pkc .space-archive-section,
body.pkc .space-organization-archive,
body.pkc .space-content-section,
body.pkc .space-page-content-wrap,
body.pkc .space-page-content-box-wrap,
body.pkc .space-sidebar-section { background: transparent; color: var(--text); }
body.pkc .space-page-wrapper { max-width: var(--wrap); }

/* Cards (reviews, bonuses, games, news) */
body.pkc [class*="-archive-item-ins"],
body.pkc .space-news-1-item-ins,
body.pkc .space-archive-loop-item-ins,
body.pkc .space-archive-loop-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  color: var(--text);
  overflow: hidden;
}
body.pkc [class*="-archive-item-title"] a,
body.pkc [class*="-archive-item-title"],
body.pkc .space-news-1-item-title a,
body.pkc .space-archive-loop-item-title a,
body.pkc .space-archive-loop-item-title,
body.pkc .space-news-1-item-title { color: var(--text); font-family: var(--font-head); font-weight: 600; }
body.pkc [class*="-archive-item-title"] a:hover,
body.pkc .space-news-1-item-title a:hover,
body.pkc .space-archive-loop-item-title a:hover { color: var(--secondary-text); }
body.pkc [class*="-archive-item-desc"],
body.pkc [class*="-short-desc"],
body.pkc .space-archive-loop-item-excerpt,
body.pkc .space-archive-loop-item-meta,
body.pkc .space-archive-loop-item-meta a,
body.pkc .space-news-1-item-meta,
body.pkc .space-news-1-item-meta a { color: var(--muted); }
body.pkc [class*="-archive-item-button"] a {
  background: var(--brand-gradient); color: var(--on-cta); border: 0; border-radius: 999px;
  font-weight: 600; box-shadow: var(--glow-pink); transition: transform .16s var(--ease);
}
body.pkc [class*="-archive-item-button"] a:active { transform: scale(.97); }
body.pkc .space-archive-loop-item-img-category a, body.pkc .space-archive-loop-item-title-box .space-archive-loop-item-img-category a { background-color: var(--badge-red) !important; color: var(--on-pink) !important; }

/* Filter pills above archives */
body.pkc .space-categories-list-box a,
body.pkc .space-categories-list a {
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 999px;
}
body.pkc .space-categories-list-box a:hover,
body.pkc .space-categories-list-box a.active { border-color: var(--secondary-text); color: var(--secondary-text); }
body.pkc .space-categories-title { color: var(--text); }

/* Pagination */
body.pkc .space-archive-navigation .page-numbers,
body.pkc .page-numbers {
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px;
}
body.pkc .page-numbers.current { background: var(--brand-gradient); color: var(--on-cta); border-color: transparent; }
body.pkc .page-numbers:hover { border-color: var(--secondary-text); }

/* Sidebar widgets */
body.pkc .space-widget,
body.pkc .space-default-widget {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: 1.1rem 1.2rem; margin-bottom: 1.1rem; color: var(--text); box-shadow: none;
}
body.pkc .space-widget-title,
body.pkc .space-widget-title span,
body.pkc .space-block-title,
body.pkc .space-widget .wp-block-heading { color: var(--muted); font: 700 .85rem/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; background: transparent; }
body.pkc .space-widget a,
body.pkc .space-widget li { color: var(--text); }
body.pkc .space-widget a:hover { color: var(--secondary-text); }
body.pkc .wp-block-search__label { color: var(--muted); font: 700 .85rem/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; }
body.pkc .wp-block-search__input,
body.pkc input[type="search"], body.pkc input[type="text"], body.pkc input[type="email"], body.pkc select, body.pkc textarea {
  background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
}
body.pkc .wp-block-search__button { background: var(--brand-gradient); color: var(--on-cta); border: 0; border-radius: 999px; }
body.pkc .space-shortcode-wrap, body.pkc .space-posts-shortcode-1, body.pkc .space-shortcode-2 { color: var(--text); }

/* Page content */
body.pkc .space-page-content,
body.pkc .space-page-content p,
body.pkc .space-page-content li,
body.pkc .space-page-content td,
body.pkc .space-page-content th,
body.pkc .wp-block-paragraph,
body.pkc .wp-block-list { color: var(--text); }
body.pkc .space-page-content h1, body.pkc .space-page-content h2, body.pkc .space-page-content h3,
body.pkc .space-page-content h4, body.pkc .wp-block-heading { color: var(--text); font-family: var(--font-head); }
body.pkc .space-page-content a { color: var(--secondary-text); }
body.pkc .space-page-content table, body.pkc .wp-block-table table { border-collapse: collapse; }
body.pkc .space-page-content th, body.pkc .space-page-content td { border: 1px solid var(--border); padding: .6rem .8rem; }
body.pkc .space-page-content th { background: var(--surface); }
body.pkc .space-page-content code { background: var(--surface); color: var(--accent-text); padding: .1em .35em; border-radius: 6px; }
body.pkc .space-page-content blockquote { border-left: 4px solid var(--accent); color: var(--muted); }

/* Comments and 404 */
body.pkc .comment-respond, body.pkc .comments-area, body.pkc .space-comments { color: var(--text); }
body.pkc .space-404, body.pkc .error404 .space-page-content { color: var(--text); }

/* The parent theme and its Customizer output use !important for these colours,
   so the overrides below must too. */
body.pkc .space-title-box,
body.pkc .space-archive-title-box {
  background-color: var(--surface) !important;
  background-image: radial-gradient(800px 320px at 85% 0%, color-mix(in srgb, var(--primary) 75%, transparent), transparent 70%) !important;
}
body.pkc .space-title-box-ins,
body.pkc .space-archive-title-box-ins { background: transparent !important; padding-top: 0; }
body.pkc .space-title-box-h1 h1,
body.pkc .space-archive-title-box-h1 h1 { color: var(--text) !important; }
body.pkc .space-title-box .space-page-content-excerpt p,
body.pkc .author .space-page-content-excerpt p,
body.pkc .space-title-box .space-breadcrumbs,
body.pkc .space-title-box .space-breadcrumbs a,
body.pkc .space-archive-title-box .space-breadcrumbs,
body.pkc .space-archive-title-box .space-breadcrumbs a { color: var(--muted) !important; }

body.pkc [class*="space-news-"][class*="-item-title"] a,
body.pkc .space-archive-loop-item-title a,
body.pkc .space-news-6-item-ins ul li a,
body.pkc .space-news-9-item-title-box a,
body.pkc .space-news-10-item-title a,
body.pkc .small .space-news-11-item-title a,
body.pkc ul.wp-block-latest-posts li a,
body.pkc .slotsl-thumb-url { color: var(--text) !important; }
body.pkc [class*="space-news-"][class*="-item-title"] a:hover,
body.pkc .space-archive-loop-item-title a:hover,
body.pkc .space-news-6-item-ins ul li a:hover,
body.pkc .space-news-9-item-title-box a:hover,
body.pkc .space-news-10-item-title a:hover,
body.pkc .small .space-news-11-item-title a:hover,
body.pkc ul.wp-block-latest-posts li a:hover { color: var(--secondary-text) !important; }
body.pkc .space-comments-list-item-author a,
body.pkc .space-comments-list-item-date, body.pkc .space-comments-list-item-date a,
body.pkc p.logged-in-as, body.pkc p.logged-in-as a,
body.pkc .space-comments-form-box p.comment-notes, body.pkc form.comment-form p.comment-notes { color: var(--muted) !important; }
body.pkc .space-archive-loop-item-img-category a:hover { background-color: var(--badge-red) !important; }
/* Missing media: hide the broken-image alt text and the white placeholder. */
body.pkc .space-archive-loop-item-img-ins,
body.pkc .space-news-1-item-img { background: var(--surface); }
body.pkc .space-archive-loop-item-img img, body.pkc .space-news-1-item-img img, body.pkc [class*="-archive-item-img"] img { font-size: 0; color: transparent; }

/* Bonus code boxes in the parent's bonus archive and single templates */
body.pkc .space-offers-archive-item-code-value,
body.pkc .space-aces-single-offer-info-code-value {
  background: var(--surface) !important; color: var(--accent-text) !important; border: 1.5px dashed var(--accent) !important; border-radius: 12px;
}
body.pkc .space-offers-archive-item-code-value *,
body.pkc .space-aces-single-offer-info-code-value * { color: var(--accent-text); }
body.pkc .space-offers-archive-item-code-title span,
body.pkc .space-aces-single-offer-info-code-value legend,
body.pkc .space-aces-single-offer-info-code-value span.space-code-title {
  background: var(--card) !important; color: var(--muted) !important; font: 700 .72rem/1 var(--font-label); letter-spacing: .12em; text-transform: uppercase; padding: .15rem .5rem;
}

body.pkc [class*="space-"][class*="-item-title"] a,
body.pkc [class*="space-"][class*="-item-title"] { color: var(--text) !important; }
body.pkc [class*="space-"][class*="-item-title"] a:hover { color: var(--secondary-text) !important; }
body.pkc [class*="space-companies"][class*="-item"] p,
body.pkc [class*="space-companies"][class*="-item"] span:not(.star) { color: var(--muted); }

/* Embedded calculators and trainers draw their own dark felt panels in both modes. */
body.pkc .space-page-content [class*="pcg-"] a { color: #f06aa9; }

/* ================= Mobile and touch refinements (all templates) ================= */
/* Touch targets: enlarge the hit area to 44px without changing how links look. */
@media (pointer: coarse), (max-width: 900px) {
  .pkc-crumbs a, .pkc-link, .pkc-mini__t, .pkc-footer__col a, .pkc-topbar a, .pkc-tags a,
  .pkc-ticker__track a, .pkc-disclosure a, .pkc-author .pkc-link, .pkc-toc a,
  body.pkc .space-widget li a, body.pkc .space-archive-loop-item-meta a,
  body.pkc .space-breadcrumbs a, body.pkc .space-archive-loop-item-excerpt + a,
  body.pkc .space-archive-loop-item-excerpt ~ a { position: relative; }
  .pkc-crumbs a::after, .pkc-link::after, .pkc-mini__t::after, .pkc-footer__col a::after, .pkc-topbar a::after,
  .pkc-tags a::after, .pkc-ticker__track a::after, .pkc-disclosure a::after, .pkc-toc a::after,
  body.pkc .space-widget li a::after, body.pkc .space-breadcrumbs a::after,
  body.pkc .space-archive-loop-item-meta a::after { content: ""; position: absolute; inset: -13px -6px; }
  .pkc-footer__col a { padding-block: .5rem; }
  .pkc-toc a { padding-block: .6rem; }
  body.pkc .space-widget li { padding-block: .15rem; }
  body.pkc .space-categories-list-box a, body.pkc .space-categories-list a { min-height: 40px; display: inline-flex; align-items: center; padding-inline: 1rem; }
  body.pkc .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  body.pkc [class*="-archive-item-button"] a, body.pkc .wp-block-search__button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  body.pkc .space-archive-loop-item-excerpt ~ a, body.pkc .space-archive-loop-item .read-more { display: inline-block; padding-block: .6rem; }
  .pkc-btn--sm { min-height: 44px; }
  .pkc-iconbtn { width: 44px; height: 44px; }
  .pkc-chip { min-height: 44px; }
  .pkc-nav__toggle { min-width: 44px; }
}
/* Minimum readable text */
.pkc-code__label, .pkc-footer__h, .pkc-widget__title, .pkc-mega__h, .pkc-rg__links small { font-size: max(.78rem, 12px); }
.pkc-badge { font-size: .8rem; }

/* Phones */
@media (max-width: 640px) {
  body.pkc .space-title-box, body.pkc .space-archive-title-box { padding-block: 1.2rem; }
  body.pkc .space-title-box-h1 h1, body.pkc .space-archive-title-box-h1 h1 { font-size: clamp(1.6rem, 7vw, 2.1rem) !important; }
  body.pkc .space-page-wrapper { padding-inline: 16px; }
  body.pkc .space-sidebar-section { margin-top: 1.5rem; }
  body.pkc .space-widget { padding: 1rem; }
  /* Search results and archive list items stack cleanly */
  body.pkc .space-archive-loop-item-ins { display: block; }
  body.pkc .space-archive-loop-item-img, body.pkc .space-archive-loop-item-title-box { width: 100% !important; float: none !important; }
  /* Long calculator tables or code scroll sideways inside their own box, never the page */
  body.pkc .space-page-content table, body.pkc .space-page-content pre { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  body.pkc .space-page-content iframe, body.pkc .space-page-content video { max-width: 100%; }
  /* 404: skip the long sidebar */
  body.error404 .space-sidebar-section { display: none; }
}
@media (max-width: 380px) {
  .pkc-wrap { padding-inline: 14px; }
  .pkc-btn { padding-inline: 1rem; }
  .pkc-hero__h1 { font-size: 2.1rem; }
}
@media (pointer: coarse), (max-width: 900px) {
  .pkc-topbar .pkc-iconbtn, a.pkc-badge, .pkc-bonus__title a, .pkc-unit__title a, .pkc-news__title a, .pkc-rank__name { position: relative; }
  .pkc-topbar .pkc-iconbtn::after, a.pkc-badge::after, .pkc-bonus__title a::after, .pkc-unit__title a::after, .pkc-news__title a::after, .pkc-rank__name::after { content: ""; position: absolute; inset: -9px -6px; }
  body.pkc input[type="checkbox"], body.pkc input[type="radio"] { width: 22px; height: 22px; }
  body.pkc .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: .6rem; }
}
@media (pointer: coarse), (max-width: 900px) {
  .pkc-logo, body.pkc [class*="space-"][class*="-item-title"] a, body.pkc [class*="-img-category"] a { position: relative; }
  .pkc-logo::after, body.pkc [class*="space-"][class*="-item-title"] a::after, body.pkc [class*="-img-category"] a::after { content: ""; position: absolute; inset: -10px -6px; }
}
@media (pointer: coarse) {
  body.pkc .space-page-content input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  body.pkc .space-page-content select,
  body.pkc .space-page-content button { min-height: 44px; }
}
.pkc-author > div { min-width: 0; }
.pkc-author__name, .pkc-author__bio { overflow-wrap: anywhere; }
body.pkc .space-page-content { overflow-wrap: anywhere; }
@media (max-width: 380px) {
  body.pkc .space-page-wrapper, body.pkc .space-page-content-wrap { padding-inline: 12px; }
  body.pkc .space-page-content [class*="pcg-"] input, body.pkc .space-page-content [class*="pcg-"] select,
  body.pkc .space-page-content [class*="pcg-"] textarea { max-width: 100%; box-sizing: border-box; }
  .pkc-author { flex-direction: column; }
}
@media (max-width: 380px) {
  body.pkc .space-page-content-wrap { padding-inline: 0; }
  body.pkc .space-page-content [class*="pcg-"][class*="grid"] { grid-template-columns: minmax(0, 1fr) !important; }
  body.pkc .space-page-content .pcg-table, body.pkc .space-page-content .pcg-section { padding-inline: 12px; }
}

/* ================= Tool box (Tools and Training hubs and their pages) ================= */
.pkc-toolbox { margin: 0 0 2rem; padding: 1.1rem 1.1rem 1.2rem; border-radius: 20px; border: 1px solid var(--border);
  background: radial-gradient(520px 200px at 0% 0%, color-mix(in srgb, var(--primary) 55%, transparent), transparent 70%), var(--card); box-shadow: var(--shadow-card); }
.pkc-toolbox__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
body.pkc .pkc-toolbox__title { margin: 0; font: 700 .9rem/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; color: var(--secondary-text); }
.pkc-toolbox__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: .8rem; }
.pkc-tp { margin: 0; padding: 0; }
body.pkc .pkc-tp__a { display: flex; flex-direction: column; gap: .5rem; height: 100%; padding: .5rem .5rem .75rem; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; transition: translate .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease); }
body.pkc .pkc-tp__a:hover { translate: 0 -3px; border-color: var(--secondary-text); }
.pkc-tp.is-here .pkc-tp__a { border-color: var(--secondary-text); background: color-mix(in srgb, var(--secondary) 12%, var(--surface)); }
.pkc-tp__poster { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; --a: #4a1d8c; --b: #2a1250; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: 0 6px 14px rgba(0, 0, 0, .28); }
.pkc-tp--1 .pkc-tp__poster { --a: #b0165f; --b: #4a1d8c; }
.pkc-tp--2 .pkc-tp__poster { --a: #2f3fa8; --b: #1a1550; }
.pkc-tp--3 .pkc-tp__poster { --a: #8e2ba8; --b: #3b1466; }
.pkc-tp--4 .pkc-tp__poster { --a: #a3550f; --b: #4a1d8c; }
.pkc-tp--5 .pkc-tp__poster { --a: #0f7a6a; --b: #2a1250; }
.pkc-tp__poster::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 14px); }
.pkc-tp__poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; font-size: 0; color: transparent; }
.pkc-tp__art { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.pkc-tp__art .pkc-i { width: 40%; height: 40%; max-width: 54px; max-height: 54px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); transition: transform .25s var(--ease); }
.pkc-tp__a:hover .pkc-tp__art .pkc-i { transform: scale(1.08); }
.pkc-tp__kind { position: absolute; left: .45rem; bottom: .4rem; padding: .1rem .5rem; border-radius: 99px; background: rgba(12, 7, 22, .7); color: #f5f1fa; font: 700 .7rem/1.4 var(--font-label); letter-spacing: .1em; text-transform: uppercase; }
.pkc-tp__name { padding-inline: .2rem; font-weight: 700; font-size: .93rem; line-height: 1.3; }
.pkc-tp__cta { margin-top: auto; padding-inline: .2rem; display: inline-flex; align-items: center; gap: .3rem; color: var(--secondary-text); font-weight: 600; font-size: .82rem; }
@media (max-width: 640px) {
  .pkc-toolbox { padding: .9rem; }
  .pkc-toolbox__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
}

/* The parent theme styles lists, links and headings inside page content; reset them for the tool box. */
body.pkc .space-page-content .pkc-toolbox__list { margin: 0; padding: 0; list-style: none; }
body.pkc .space-page-content .pkc-toolbox__list > li { margin: 0; padding: 0; list-style: none; }
body.pkc .space-page-content .pkc-toolbox__list > li::marker { content: ""; }
body.pkc .space-page-content a.pkc-tp__a { color: var(--text); text-decoration: none; border: 1px solid var(--border); }
body.pkc .space-page-content a.pkc-tp__a:hover { border-color: var(--secondary-text); }
body.pkc .space-page-content .pkc-tp.is-here a.pkc-tp__a { border-color: var(--secondary-text); }
body.pkc .space-page-content .pkc-tp__name { color: var(--text); }
body.pkc .space-page-content .pkc-tp__cta { color: var(--secondary-text); }
body.pkc .space-page-content h2.pkc-toolbox__title { font: 700 .9rem/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; color: var(--secondary-text); margin: 0; }
body.pkc .space-page-content .pkc-toolbox__head .pkc-link { color: var(--secondary-text); text-decoration: none; white-space: nowrap; }
@media (max-width: 640px) {
  .pkc-tp__kind { font-size: .62rem; padding: .05rem .4rem; }
  body.pkc .space-page-content h2.pkc-toolbox__title { font-size: .8rem; }
  .pkc-toolbox__head { align-items: flex-start; }
}

/* Comment form: title and labels readable; fields black with light text in dark mode */
body.pkc .comment-respond .comment-reply-title,
body.pkc #reply-title,
body.pkc .comment-first-title,
body.pkc .comment-respond label,
body.pkc .comment-respond .comment-notes,
body.pkc .comment-respond .required-field-message { color: var(--text) !important; }
body.pkc .comment-respond input[type="text"],
body.pkc .comment-respond input[type="email"],
body.pkc .comment-respond input[type="url"],
body.pkc .comment-respond textarea {
  background: var(--input-bg, var(--surface)) !important; color: var(--text) !important;
  border: 1px solid var(--border) !important; border-radius: var(--radius-s, 10px);
}
body.pkc .comment-respond input::placeholder, body.pkc .comment-respond textarea::placeholder { color: var(--muted) !important; }
:root:not([data-theme="light"]) body.pkc .comment-respond input[type="text"],
:root:not([data-theme="light"]) body.pkc .comment-respond input[type="email"],
:root:not([data-theme="light"]) body.pkc .comment-respond input[type="url"],
:root:not([data-theme="light"]) body.pkc .comment-respond textarea { background: #000 !important; color: #f4f1fa !important; border-color: rgba(255,255,255,.22) !important; }
