/* ==========================================================================
   pcr-theme — Gutenberg block vocabulary (PCR_GUTENBERG_CONTRACT.md)
   Loaded on the front end (enqueued, dep: pcr-tokens) AND in the block
   editor (add_editor_style) so authoring matches the rendered page.

   Scope: every contract-vocabulary rule and core-block-default rule below
   is scoped under `:is(.entry, .editor-styles-wrapper)` —
     .entry               = the wrapper page.php puts around the_content()
     .editor-styles-wrapper = the block editor's own content root
   This keeps the vocabulary out of front-page.php / page-review.php /
   the catalog templates / header / footer, while still previewing
   correctly in wp-admin. A short section near the end additionally
   neutralises theme.json's global element styles (h1-h6, a, body, ...)
   which would otherwise bleed into the standalone front-page.php React
   landing now that a theme.json exists (see note there).
   ========================================================================== */

/* ── Alignment support inside .entry (classic theme has no block-template
      layout engine, so alignwide/alignfull are implemented by hand) ── */
.entry{max-width:var(--max-w-narrow);width:100%;margin-inline:auto}
.entry .alignwide{max-width:var(--max-w);width:100%;margin-left:50%;transform:translateX(-50%)}
.entry .alignfull{max-width:100vw;width:100vw;margin-left:50%;transform:translateX(-50%)}
.entry .alignfull.pcr-cta{border-radius:0}
.entry .aligncenter{margin-left:auto;margin-right:auto}

/* ── page.php hero (breadcrumbs + H1 + deck + meta), lives inside .entry ─ */
.entry .pcr-page-hero{margin-bottom:var(--sp-8)}
.entry .pcr-page-hero h1{margin-bottom:var(--sp-3)}
.entry .pcr-page-hero .pcr-lead{margin-bottom:var(--sp-3)}
.entry .pcr-page-hero .pcr-note{margin-bottom:0}

/* ── Text ─────────────────────────────────────────────────────────────── */
:is(.entry,.editor-styles-wrapper) .pcr-lead,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-lead{
    font-size:var(--fs-xl);font-weight:var(--fw-regular);color:var(--clr-muted);
    line-height:1.6;margin-bottom:var(--sp-6);
}
:is(.entry,.editor-styles-wrapper) .pcr-eyebrow,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-eyebrow{
    display:flex;align-items:center;gap:var(--sp-2);
    font-family:var(--ff-heading);font-size:var(--fs-xs);font-weight:var(--fw-semibold);
    text-transform:uppercase;letter-spacing:.1em;color:var(--clr-gold);
    margin-bottom:var(--sp-2);
}
:is(.entry,.editor-styles-wrapper) .pcr-eyebrow svg{width:14px;height:14px}
:is(.entry,.editor-styles-wrapper) .pcr-note,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-note{
    font-size:var(--fs-xs);color:var(--clr-dim);margin-bottom:var(--sp-4);
}

/* ── Boxes ────────────────────────────────────────────────────────────── */
:is(.entry,.editor-styles-wrapper) .pcr-callout,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-callout{
    background:var(--clr-surface);border:1px solid var(--clr-border);
    border-left:3px solid var(--clr-gold);border-radius:var(--r-md);
    padding:var(--sp-5) var(--sp-6);margin-bottom:var(--sp-6);
}
:is(.entry,.editor-styles-wrapper) .pcr-callout.is-warning{border-left-color:var(--clr-red)}
:is(.entry,.editor-styles-wrapper) .pcr-callout.is-success{border-left-color:var(--clr-green)}
:is(.entry,.editor-styles-wrapper) .pcr-callout > *:last-child{margin-bottom:0}

:is(.entry,.editor-styles-wrapper) .pcr-card,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-card{
    background:var(--clr-surface);border:1px solid var(--clr-border);
    border-radius:var(--r-xl);padding:var(--sp-6);margin-bottom:var(--sp-6);
}
:is(.entry,.editor-styles-wrapper) .pcr-card > *:last-child{margin-bottom:0}

:is(.entry,.editor-styles-wrapper) .pcr-verdict,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-verdict{
    background:linear-gradient(160deg,var(--clr-surface-hover),var(--clr-surface));
    border:1px solid var(--clr-gold);border-radius:var(--r-xl);
    padding:var(--sp-8);margin-bottom:var(--sp-6);
}
:is(.entry,.editor-styles-wrapper) .pcr-verdict > *:last-child{margin-bottom:0}

:is(.entry,.editor-styles-wrapper) .pcr-toc,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-toc{
    border:1px solid var(--clr-border);border-radius:var(--r-lg);
    background:var(--clr-surface);padding:var(--sp-5) var(--sp-6);margin-bottom:var(--sp-8);
}
:is(.entry,.editor-styles-wrapper) .pcr-toc .pcr-eyebrow{margin-bottom:var(--sp-3)}
:is(.entry,.editor-styles-wrapper) .pcr-toc ol{list-style:none;counter-reset:pcr-toc;padding-left:0;margin:0}
:is(.entry,.editor-styles-wrapper) .pcr-toc li{counter-increment:pcr-toc;margin-bottom:var(--sp-2);font-size:var(--fs-sm)}
:is(.entry,.editor-styles-wrapper) .pcr-toc li:last-child{margin-bottom:0}
:is(.entry,.editor-styles-wrapper) .pcr-toc li::before{content:counter(pcr-toc) ".";color:var(--clr-gold);font-weight:var(--fw-semibold);margin-right:var(--sp-2)}
:is(.entry,.editor-styles-wrapper) .pcr-toc a{color:var(--clr-muted)}
:is(.entry,.editor-styles-wrapper) .pcr-toc a:hover{color:var(--clr-text)}

/* ── Grids ────────────────────────────────────────────────────────────── */
:is(.entry,.editor-styles-wrapper) .pcr-stat-grid{
    display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
    gap:var(--sp-4);margin-bottom:var(--sp-6);
}
:is(.entry,.editor-styles-wrapper) .pcr-stat{
    background:var(--clr-surface);border:1px solid var(--clr-border);
    border-radius:var(--r-lg);padding:var(--sp-5);text-align:center;
}
:is(.entry,.editor-styles-wrapper) .pcr-stat .pcr-stat__n{
    font-family:var(--ff-heading);font-size:var(--fs-3xl);font-weight:var(--fw-black);
    color:var(--clr-gold);line-height:1.1;margin-bottom:var(--sp-1);
}
:is(.entry,.editor-styles-wrapper) .pcr-stat .pcr-stat__k{
    font-size:var(--fs-xs);text-transform:uppercase;letter-spacing:.08em;
    color:var(--clr-dim);font-weight:var(--fw-semibold);margin-bottom:0;
}

:is(.entry,.editor-styles-wrapper) .pcr-feature-grid{
    display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:var(--sp-4);margin-bottom:var(--sp-6);
}
:is(.entry,.editor-styles-wrapper) .pcr-feature{
    background:var(--clr-surface);border:1px solid var(--clr-border);
    border-radius:var(--r-lg);padding:var(--sp-5);
}
:is(.entry,.editor-styles-wrapper) .pcr-feature h3,
:is(.entry,.editor-styles-wrapper) .pcr-feature h4{margin-bottom:var(--sp-2);font-size:var(--fs-lg)}
:is(.entry,.editor-styles-wrapper) .pcr-feature p{margin-bottom:0;font-size:var(--fs-sm)}

:is(.entry,.editor-styles-wrapper) .pcr-proscons{
    display:grid;grid-template-columns:1fr 1fr;gap:var(--sp-5);margin-bottom:var(--sp-6);
}
:is(.entry,.editor-styles-wrapper) .pcr-pros,
:is(.entry,.editor-styles-wrapper) .pcr-cons{
    border:1px solid var(--clr-border);border-radius:var(--r-lg);
    border-top:3px solid var(--clr-border);padding:var(--sp-5);
}
:is(.entry,.editor-styles-wrapper) .pcr-pros{background:rgba(52,211,153,.07);border-top-color:var(--clr-green)}
:is(.entry,.editor-styles-wrapper) .pcr-cons{background:rgba(251,113,133,.07);border-top-color:var(--clr-red)}
:is(.entry,.editor-styles-wrapper) .pcr-pros ul,
:is(.entry,.editor-styles-wrapper) .pcr-cons ul{margin-bottom:0}
@media(max-width:768px){
    :is(.entry,.editor-styles-wrapper) .pcr-proscons{grid-template-columns:1fr}
}

/* ── Lists ────────────────────────────────────────────────────────────── */
:is(.entry,.editor-styles-wrapper) .pcr-checklist,
:is(.entry,.editor-styles-wrapper) .pcr-crosslist,
:is(.entry,.editor-styles-wrapper) .pcr-numlist,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-checklist,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-crosslist,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-numlist{
    list-style:none;padding-left:0;margin-bottom:var(--sp-6);
}
:is(.entry,.editor-styles-wrapper) .pcr-checklist li,
:is(.entry,.editor-styles-wrapper) .pcr-crosslist li,
:is(.entry,.editor-styles-wrapper) .pcr-numlist li,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-checklist li,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-crosslist li,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-numlist li{
    position:relative;padding-left:var(--sp-8);margin-bottom:var(--sp-3);color:var(--clr-muted);
}
:is(.entry,.editor-styles-wrapper) .pcr-checklist li::before,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-checklist li::before{
    content:"\2713";position:absolute;left:0;top:0;width:20px;height:20px;
    display:flex;align-items:center;justify-content:center;
    border-radius:var(--r-sm);background:rgba(52,211,153,.14);
    color:var(--clr-green);font-weight:var(--fw-bold);font-size:var(--fs-xs);
}
:is(.entry,.editor-styles-wrapper) .pcr-crosslist li::before,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-crosslist li::before{
    content:"\2715";position:absolute;left:0;top:0;width:20px;height:20px;
    display:flex;align-items:center;justify-content:center;
    border-radius:var(--r-sm);background:rgba(251,113,133,.14);
    color:var(--clr-red);font-weight:var(--fw-bold);font-size:var(--fs-xs);
}
:is(.entry,.editor-styles-wrapper) .pcr-numlist{counter-reset:pcr-num}
:is(.entry,.editor-styles-wrapper) .pcr-numlist li,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-numlist li{counter-increment:pcr-num}
:is(.entry,.editor-styles-wrapper) .pcr-numlist li::before,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-numlist li::before{
    content:counter(pcr-num);position:absolute;left:0;top:0;width:20px;height:20px;
    display:flex;align-items:center;justify-content:center;border-radius:50%;
    background:var(--clr-gold);color:var(--clr-bg);font-family:var(--ff-heading);
    font-size:var(--fs-xs);font-weight:var(--fw-bold);
}

:is(.entry,.editor-styles-wrapper) .pcr-linkgrid,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-linkgrid{
    list-style:none;padding-left:0;margin-bottom:var(--sp-6);
    display:flex;flex-wrap:wrap;gap:var(--sp-2);
}
:is(.entry,.editor-styles-wrapper) .pcr-linkgrid li{margin:0}
:is(.entry,.editor-styles-wrapper) .pcr-linkgrid li a{
    display:inline-flex;align-items:center;padding:var(--sp-1) var(--sp-3);
    border-radius:var(--r-full);background:var(--clr-surface);
    border:1px solid var(--clr-border);color:var(--clr-muted);
    font-size:var(--fs-sm);transition:all var(--dur) var(--ease);
}
:is(.entry,.editor-styles-wrapper) .pcr-linkgrid li a:hover{
    border-color:var(--clr-gold);color:var(--clr-gold);background:var(--clr-surface-hover);
}

/* ── Tables ───────────────────────────────────────────────────────────── */
:is(.entry,.editor-styles-wrapper) .pcr-table,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-table{
    overflow-x:auto;-webkit-overflow-scrolling:touch;display:block;
    border:1px solid var(--clr-border);border-radius:var(--r-lg);margin-bottom:var(--sp-6);
}
:is(.entry,.editor-styles-wrapper) .pcr-table table{width:100%;min-width:480px;border-collapse:collapse}
:is(.entry,.editor-styles-wrapper) .pcr-table thead{background:var(--clr-surface-hover)}
:is(.entry,.editor-styles-wrapper) .pcr-table th{
    text-align:left;padding:var(--sp-3) var(--sp-4);font-size:var(--fs-xs);
    text-transform:uppercase;letter-spacing:.06em;color:var(--clr-dim);
    border-bottom:1px solid var(--clr-border);
}
:is(.entry,.editor-styles-wrapper) .pcr-table td{
    padding:var(--sp-3) var(--sp-4);border-bottom:1px solid var(--clr-border);
    color:var(--clr-muted);font-size:var(--fs-sm);
}
:is(.entry,.editor-styles-wrapper) .pcr-table tbody tr:last-child td{border-bottom:0}
:is(.entry,.editor-styles-wrapper) .pcr-table tbody tr:hover td{background:var(--clr-surface)}
:is(.entry,.editor-styles-wrapper) .pcr-table.is-compact th,
:is(.entry,.editor-styles-wrapper) .pcr-table.is-compact td{padding:var(--sp-2) var(--sp-3);font-size:var(--fs-xs)}

/* ── FAQ ──────────────────────────────────────────────────────────────── */
:is(.entry,.editor-styles-wrapper) .pcr-faq{
    display:flex;flex-direction:column;gap:var(--sp-3);margin-bottom:var(--sp-6);
}
:is(.entry,.editor-styles-wrapper) .pcr-faq-item,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-faq-item{
    border:1px solid var(--clr-border);border-radius:var(--r-md);
    background:var(--clr-surface);padding:var(--sp-4) var(--sp-5);
}
:is(.entry,.editor-styles-wrapper) .pcr-faq-item summary,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-faq-item summary{
    cursor:pointer;list-style:none;display:flex;align-items:center;
    justify-content:space-between;gap:var(--sp-3);font-family:var(--ff-heading);
    font-weight:var(--fw-semibold);color:var(--clr-text);font-size:var(--fs-base);
}
:is(.entry,.editor-styles-wrapper) .pcr-faq-item summary::-webkit-details-marker,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-faq-item summary::-webkit-details-marker{display:none}
:is(.entry,.editor-styles-wrapper) .pcr-faq-item summary::after,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-faq-item summary::after{
    content:"";width:8px;height:8px;flex-shrink:0;
    border-right:2px solid var(--clr-gold);border-bottom:2px solid var(--clr-gold);
    transform:rotate(45deg);transition:transform var(--dur) var(--ease);
}
:is(.entry,.editor-styles-wrapper) .pcr-faq-item[open] summary::after,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-faq-item[open] summary::after{transform:rotate(-135deg)}
:is(.entry,.editor-styles-wrapper) .pcr-faq-item > *:not(summary),
:is(.entry,.editor-styles-wrapper) .is-style-pcr-faq-item > *:not(summary){margin-top:var(--sp-3);margin-bottom:0}

/* ── CTA / misc ───────────────────────────────────────────────────────── */
:is(.entry,.editor-styles-wrapper) .pcr-cta,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-cta{
    background:linear-gradient(135deg,var(--clr-gold) 0%,var(--clr-accent) 100%);
    border-radius:var(--r-2xl);padding:var(--sp-12) var(--sp-8);
    text-align:center;margin-bottom:var(--sp-8);
}
:is(.entry,.editor-styles-wrapper) .pcr-cta h2,
:is(.entry,.editor-styles-wrapper) .pcr-cta h3{color:var(--clr-bg);margin-bottom:var(--sp-3)}
:is(.entry,.editor-styles-wrapper) .pcr-cta p{
    color:rgba(14,0,37,.75);margin-bottom:var(--sp-6);
    max-width:520px;margin-left:auto;margin-right:auto;
}
:is(.entry,.editor-styles-wrapper) .pcr-cta .wp-block-buttons,
:is(.entry,.editor-styles-wrapper) .pcr-cta__actions{
    display:flex;gap:var(--sp-3);justify-content:center;flex-wrap:wrap;margin-bottom:0;
}

:is(.entry,.editor-styles-wrapper) .wp-block-button.pcr-btn-gold .wp-block-button__link,
:is(.entry,.editor-styles-wrapper) .wp-block-button.is-style-pcr-btn-gold .wp-block-button__link{
    background:var(--clr-gold);color:var(--clr-bg);border-radius:var(--r-md);
}
:is(.entry,.editor-styles-wrapper) .wp-block-button.pcr-btn-gold .wp-block-button__link:hover,
:is(.entry,.editor-styles-wrapper) .wp-block-button.is-style-pcr-btn-gold .wp-block-button__link:hover{
    background:var(--clr-gold-bright);color:var(--clr-bg);
}
:is(.entry,.editor-styles-wrapper) .wp-block-button.pcr-btn-ghost .wp-block-button__link,
:is(.entry,.editor-styles-wrapper) .wp-block-button.is-style-pcr-btn-ghost .wp-block-button__link{
    background:transparent;color:var(--clr-text);
    border:1.5px solid var(--clr-border);border-radius:var(--r-md);
}
:is(.entry,.editor-styles-wrapper) .wp-block-button.pcr-btn-ghost .wp-block-button__link:hover,
:is(.entry,.editor-styles-wrapper) .wp-block-button.is-style-pcr-btn-ghost .wp-block-button__link:hover{
    background:transparent;border-color:var(--clr-gold);color:var(--clr-gold);
}

:is(.entry,.editor-styles-wrapper) .pcr-quote,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-quote{
    border-left:3px solid var(--clr-gold);padding:var(--sp-1) 0 var(--sp-1) var(--sp-6);
    margin:0 0 var(--sp-6);font-size:var(--fs-xl);font-style:italic;color:var(--clr-text);
}
:is(.entry,.editor-styles-wrapper) .pcr-quote cite,
:is(.entry,.editor-styles-wrapper) .is-style-pcr-quote cite{
    display:block;margin-top:var(--sp-3);font-size:var(--fs-sm);
    font-style:normal;color:var(--clr-dim);
}

:is(.entry,.editor-styles-wrapper) .pcr-divider{
    border:none;border-top:1px solid var(--clr-border);margin:var(--sp-10) 0;opacity:1;
}

:is(.entry,.editor-styles-wrapper) .pcr-chip-row{
    display:flex;flex-wrap:wrap;gap:var(--sp-2);margin-bottom:var(--sp-4);
}
:is(.entry,.editor-styles-wrapper) .pcr-chip-row .pcr-chip{
    display:inline-flex;align-items:center;margin:0;padding:var(--sp-1) var(--sp-3);
    border-radius:var(--r-full);background:var(--clr-surface);
    border:1px solid var(--clr-border);font-size:var(--fs-xs);color:var(--clr-muted);
}

/* ── Core block defaults (used by editorial pages) ───────────────────── */
:is(.entry,.editor-styles-wrapper) .wp-block-heading{scroll-margin-top:var(--sp-8)}
:is(.entry,.editor-styles-wrapper) .wp-block-list{color:var(--clr-muted);margin-bottom:var(--sp-6)}
:is(.entry,.editor-styles-wrapper) .wp-block-table{margin-bottom:var(--sp-6)}
:is(.entry,.editor-styles-wrapper) .wp-block-table table{width:100%;border-collapse:collapse}
:is(.entry,.editor-styles-wrapper) .wp-block-table th,
:is(.entry,.editor-styles-wrapper) .wp-block-table td{
    padding:var(--sp-2) var(--sp-3);border-bottom:1px solid var(--clr-border);
    text-align:left;font-size:var(--fs-sm);
}
:is(.entry,.editor-styles-wrapper) .wp-block-quote{
    border-left:3px solid var(--clr-border);padding-left:var(--sp-5);margin:0 0 var(--sp-6);
}
:is(.entry,.editor-styles-wrapper) .wp-block-buttons{gap:var(--sp-3);margin-bottom:var(--sp-6)}
:is(.entry,.editor-styles-wrapper) .wp-block-columns{gap:var(--sp-6);margin-bottom:var(--sp-6)}
:is(.entry,.editor-styles-wrapper) .wp-block-group{margin-bottom:var(--sp-6)}
:is(.entry,.editor-styles-wrapper) .wp-block-separator{
    border-top:1px solid var(--clr-border);opacity:1;max-width:100%;margin:var(--sp-8) auto;
}
:is(.entry,.editor-styles-wrapper) .wp-block-details{background:var(--clr-surface);margin-bottom:var(--sp-3)}
:is(.entry,.editor-styles-wrapper) .wp-block-details summary{cursor:pointer;font-weight:var(--fw-semibold)}
:is(.entry,.editor-styles-wrapper) .wp-block-image{margin-bottom:var(--sp-6)}
:is(.entry,.editor-styles-wrapper) .wp-block-image img{border-radius:var(--r-lg)}
:is(.entry,.editor-styles-wrapper) .wp-block-embed{margin-bottom:var(--sp-6);border-radius:var(--r-lg);overflow:hidden}
:is(.entry,.editor-styles-wrapper) .wp-block-embed iframe{width:100%;border-radius:var(--r-lg)}

@media(max-width:768px){
    .entry .wp-block-columns{flex-wrap:wrap}
    .entry .wp-block-column{flex-basis:100% !important}
    :is(.entry,.editor-styles-wrapper) .pcr-stat-grid,
    :is(.entry,.editor-styles-wrapper) .pcr-feature-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:480px){
    :is(.entry,.editor-styles-wrapper) .pcr-stat-grid,
    :is(.entry,.editor-styles-wrapper) .pcr-feature-grid{grid-template-columns:1fr}
}

/* ── [pcr_psychics] shortcode grid: optional column count (2/3/4) ─────── */
@media(min-width:1025px){
    .psychic-grid[data-cols="2"]{grid-template-columns:repeat(2,1fr)}
    .psychic-grid[data-cols="3"]{grid-template-columns:repeat(3,1fr)}
}
@media(min-width:769px) and (max-width:1024px){
    .psychic-grid[data-cols="2"]{grid-template-columns:repeat(2,1fr)}
}
