/* In-article blocks: the pieces a writer drops into a guide, styled once for the site AND the block editor.
   The theme owns the look; the content plugin's blocks print this markup (see BLOCKS.md for the contract).
   Loaded after site.css on the front, and by add_editor_style() in the editor, where the tokens come from
   editor-style.css. Components: callouts (Note / Tip / Heads up), product pick, pros & cons, FAQ, quote,
   comparison table. */

/* ---------- callouts: core/group with a block style (Note, Tip, Heads up) ---------- */
.wp-block-group:is(.is-style-wpc-note,.is-style-wpc-tip,.is-style-wpc-warning){
  --mark:var(--sky);
  margin:32px 0;padding:20px 24px 14px;background:var(--white);border:1.5px solid var(--ink);border-radius:6px;
  font-size:17.5px;line-height:1.65;color:var(--body)
}
.wp-block-group.is-style-wpc-tip{--mark:var(--lime)}
.wp-block-group.is-style-wpc-warning{--mark:var(--sun)}
.wp-block-group:is(.is-style-wpc-note,.is-style-wpc-tip,.is-style-wpc-warning)::before{
  content:"Note";display:flex;align-items:center;gap:10px;margin:0 0 8px;
  font-weight:800;font-size:12.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink)
}
.wp-block-group.is-style-wpc-tip::before{content:"Tip"}
.wp-block-group.is-style-wpc-warning::before{content:"Heads up"}
/* the coloured square, same marker as the topic crumbs */
.wp-block-group:is(.is-style-wpc-note,.is-style-wpc-tip,.is-style-wpc-warning)::after{
  content:"";position:absolute;left:25px;top:24px;width:9px;height:9px;background:var(--mark);border:1.5px solid var(--ink);border-radius:2px
}
.wp-block-group:is(.is-style-wpc-note,.is-style-wpc-tip,.is-style-wpc-warning){position:relative}
.wp-block-group:is(.is-style-wpc-note,.is-style-wpc-tip,.is-style-wpc-warning)::before{padding-left:20px}
.wp-block-group:is(.is-style-wpc-note,.is-style-wpc-tip,.is-style-wpc-warning) > *{margin-top:0}
.wp-block-group:is(.is-style-wpc-note,.is-style-wpc-tip,.is-style-wpc-warning) > :last-child{margin-bottom:0}
.wp-block-group:is(.is-style-wpc-note,.is-style-wpc-tip,.is-style-wpc-warning) p{margin:0 0 12px}

/* ---------- product pick (wpcrafter/product-card): the approved in-guide pick ---------- */
.wpc-pick{display:grid;grid-template-columns:120px minmax(0,1fr) auto;gap:20px;align-items:center;margin:28px 0;padding:16px 18px;border:1.5px solid var(--ink);border-radius:6px;background:var(--white)}
.wpc-pick .lg{display:block;max-width:120px;max-height:34px;width:auto;height:auto;margin:0 auto;border-radius:0}
.wpc-pick .pt{min-width:0}
.wpc-pick .pt .nm{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;color:var(--ink);font-weight:800;font-size:17px;line-height:1.2}
.wpc-pick .pt .sc{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:99px;background:var(--ink);color:var(--lime);font-stretch:112%;font-weight:900;font-size:12.5px}
.wpc-pick .pt .why{display:block;margin-top:4px;font-size:14.5px;color:var(--muted);line-height:1.45}
.wpc-pick .pt .badge{display:inline-block;margin:0 0 6px;padding:3px 8px;background:var(--lime);border:1.5px solid var(--ink);border-radius:3px;font-weight:800;font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink);line-height:1.2}
.wpc-pick .pb{display:flex;flex-direction:column;gap:8px;align-items:stretch}
.wpc-pick .pb .btn{display:inline-flex;align-items:center;justify-content:center;height:42px;padding:0 18px;border-radius:5px;background:var(--ink);color:var(--paper);font-weight:800;font-size:14.5px;white-space:nowrap;text-decoration:none}
.wpc-pick .pb .btn:hover{background:#2A2924}
.wpc-pick .pb .ghost{line-height:1.1;font-weight:700;font-size:13.5px;text-align:center;color:var(--ink);text-decoration:underline;text-decoration-color:var(--lime);text-decoration-thickness:3px;text-underline-offset:3px}
.wpc-pick.is-top{border-width:2px;box-shadow:6px 6px 0 var(--lime),6px 6px 0 2px var(--ink)}
@media (max-width:600px){
  .wpc-pick{grid-template-columns:minmax(0,1fr);gap:12px;text-align:left}
  .wpc-pick .lg{margin:0}
}

/* ---------- pros & cons (wpcrafter/product-pros-cons): the review page's columns, in an article ---------- */
.wpc-pc{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:28px 0}
.wpc-pc .pcol{background:var(--white);border:2px solid var(--ink);border-radius:6px;padding:20px 22px 12px}
.wpc-pc .pcol .pch{display:flex;align-items:center;gap:10px;margin:0 0 8px;font-stretch:112%;font-weight:900;font-size:19px;line-height:1.2;color:var(--ink)}
.wpc-pc .pcol .pch i{flex-shrink:0;width:28px;height:28px;border-radius:99px;border:2px solid var(--ink);display:grid;place-items:center;font-style:normal;font-size:14px}
.wpc-pc .good .pch i{background:var(--lime)}
.wpc-pc .bad .pch i{background:var(--coral)}
.wpc-pc ul{list-style:none;margin:0;padding:0}
.wpc-pc li{position:relative;margin:0;padding:9px 0 9px 26px;border-top:1px solid var(--line);font-size:16px;line-height:1.5;color:var(--ink)}
.wpc-pc li:first-child{border-top:0}
.wpc-pc li:last-child{padding-bottom:0}
.wpc-pc .pcol li::before{position:absolute;left:2px;top:9px;width:auto;height:auto;background:none;border:0;border-radius:0;transform:none;font-weight:900}
.wpc-pc .good li::before{content:"✓";color:var(--lime-text)}
.wpc-pc .bad li::before{content:"✕";color:#C2471D}
@media (max-width:600px){.wpc-pc{grid-template-columns:minmax(0,1fr)}}

/* ---------- FAQ (wpcrafter/faq): the approved accordion ---------- */
.wpc-faq{margin:56px 0 0}
.wpc-faq > h2{margin-top:0}
.wpc-faq details{border-top:1.5px solid var(--ink);padding:4px 0}
.wpc-faq details:last-child{border-bottom:1.5px solid var(--ink)}
.wpc-faq summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;gap:20px;align-items:center;padding:16px 0;font-weight:800;font-size:19px;line-height:1.35;color:var(--ink)}
.wpc-faq summary::-webkit-details-marker{display:none}
.wpc-faq summary:focus-visible{outline:3px solid var(--lime);outline-offset:3px}
.wpc-faq .a{padding:0 50px 16px 0;font-size:17.5px;line-height:1.65}
.wpc-faq .a > :last-child{margin-bottom:0}
.wpc-faq .a p{margin:0 0 12px}
.pm{flex-shrink:0;width:30px;height:30px;border-radius:99px;border:2px solid var(--ink);position:relative;transition:background .2s,transform .3s}
.pm::before,.pm::after{content:"";position:absolute;left:50%;top:50%;width:12px;height:2.5px;background:var(--ink);transform:translate(-50%,-50%)}
.pm::after{transform:translate(-50%,-50%) rotate(90deg);transition:transform .3s}
details[open] > summary .pm{background:var(--lime);transform:rotate(180deg)}
details[open] > summary .pm::after{transform:translate(-50%,-50%) rotate(0)}
@media (max-width:600px){.wpc-faq summary{font-size:17.5px}.wpc-faq .a{padding-right:0}}
/* the editor shows every answer (a closed <details> can't be edited) */
.editor-styles-wrapper .wpc-faq details > .a{display:block}

/* ---------- quote (core/quote, core/pullquote) ---------- */
.wp-block-quote,.wp-block-pullquote blockquote{margin:32px 0;padding:4px 0 4px 24px;border-left:4px solid var(--lime);font-size:21px;line-height:1.5;color:var(--ink);font-weight:600}
.wp-block-pullquote{margin:32px 0;padding:0;border:0;text-align:left}
.wp-block-quote p,.wp-block-pullquote p{margin:0 0 10px}
.wp-block-quote cite,.wp-block-pullquote cite{display:block;font-style:normal;font-weight:700;font-size:14px;letter-spacing:.04em;color:var(--muted)}

/* ---------- comparison table (wpcrafter/product-comparison-table) ---------- */
.wpc-ctable{margin:28px 0;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1.5px solid var(--ink);border-radius:6px;background:var(--white)}
.wpc-ctable table{width:100%;min-width:560px;margin:0;border-collapse:collapse;font-size:15.5px}
.wpc-ctable th,.wpc-ctable td{border:0;border-top:1px solid var(--line);padding:12px 14px;text-align:left;vertical-align:middle;color:var(--ink)}
.wpc-ctable thead th{border-top:0;background:var(--paper);font-weight:800;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.wpc-ctable .lg{display:block;max-width:110px;max-height:28px;width:auto;height:auto;border-radius:0}
.wpc-ctable .nm{display:block;margin-top:4px;font-weight:800;font-size:14.5px}
.wpc-ctable .sc{display:inline-flex;align-items:center;height:24px;padding:0 9px;border-radius:99px;background:var(--ink);color:var(--lime);font-stretch:112%;font-weight:900;font-size:13px}
.wpc-ctable .free{display:inline-block;margin-left:6px;padding:1px 7px;border:1.5px solid var(--ink);border-radius:3px;background:var(--lime);font-weight:800;font-size:11px;letter-spacing:.06em;text-transform:uppercase}
.wpc-ctable .btn{display:inline-flex;align-items:center;justify-content:center;height:38px;padding:0 14px;border-radius:5px;background:var(--ink);color:var(--paper);font-weight:800;font-size:13.5px;white-space:nowrap;text-decoration:none}

/* ---------- inside the article column: beat the generic prose list and link rules ---------- */
.prose :is(.wpc-pick,.wpc-pc,.wpc-faq,.wpc-ctable) a{text-decoration-thickness:3px}
.prose :is(.wpc-pick .pb .btn,.wpc-ctable .btn){text-decoration:none;color:var(--paper)}
.prose .wpc-pc li::before{top:9px}
.prose .wp-block-group:is(.is-style-wpc-note,.is-style-wpc-tip,.is-style-wpc-warning) :is(ul,ol){margin-bottom:12px}
.prose .wp-block-group:is(.is-style-wpc-note,.is-style-wpc-tip,.is-style-wpc-warning) li{font-size:17.5px}
/* phone: each row becomes a small card (cells carry data-label for their column name) */
@media (max-width:600px){
  .wpc-ctable{overflow:visible}
  .wpc-ctable table{min-width:0}
  .wpc-ctable thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .wpc-ctable tbody,.wpc-ctable tr,.wpc-ctable td{display:block}
  .wpc-ctable tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 12px;align-items:center;padding:16px;border-top:1px solid var(--line)}
  .wpc-ctable tr:first-child{border-top:0}
  .wpc-ctable td{border:0;padding:0}
  .wpc-ctable td:first-child{grid-column:1}
  .wpc-ctable td[data-label]:not(:first-child):not(:last-child){grid-column:1 / -1;display:flex;justify-content:space-between;gap:12px;font-size:15px}
  .wpc-ctable td[data-label]:not(:first-child):not(:last-child)::before{content:attr(data-label);font-weight:700;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
  .wpc-ctable td:last-child{grid-column:1 / -1}
  .wpc-ctable td:last-child .btn{display:flex;width:100%}
}

/* 0.5.3: a product with no logo shows its name in the logo slot; empty table cells show a dash */
.wpc-pick .lg-name{display:block;text-align:center;font-stretch:112%;font-weight:900;font-size:19px;line-height:1.15;color:var(--ink);overflow-wrap:anywhere}
.wpc-ctable .lg-name{display:block;font-stretch:112%;font-weight:900;font-size:16px;color:var(--ink)}
.wpc-ctable td:empty::after{content:"\2013";color:var(--muted)}
@media (max-width:600px){.wpc-pick .lg-name{text-align:left}.wpc-ctable td[data-label]:empty{display:none}}
/* the button cell holds only the button: no text line under it, so every cell centres on the same line */
.wpc-ctable td:last-child{font-size:0;line-height:0}
.wpc-ctable td:last-child .btn{font-size:13.5px;line-height:1.2;vertical-align:middle}

/* 0.5.7 images in written content: a frame so screenshots don't melt into the page, and click to see full size */
.prose :is(.wp-block-image,.wp-block-uagb-image,.wp-caption,figure:not(.wpc-ctable):not(.wp-block-table):not(.wp-block-embed)) img,
.prose p > img,.prose p > a > img{border:1.5px solid var(--ink);border-radius:6px;background:var(--white);box-shadow:5px 5px 0 rgba(14,15,12,.12)}
.prose img.wpc-zoom{cursor:zoom-in}
.prose img.wpc-zoom:focus-visible{outline:3px solid var(--lime);outline-offset:3px}
.wpc-lb{max-width:none;max-height:none;width:100vw;height:100dvh;margin:0;padding:24px;border:0;background:rgba(14,15,12,.88);display:none;align-items:center;justify-content:center;flex-direction:column;gap:12px}
.wpc-lb[open]{display:flex}
.wpc-lb::backdrop{background:transparent}
.wpc-lb img{max-width:min(1600px,100%);max-height:calc(100dvh - 96px);width:auto;height:auto;border-radius:6px;background:#fff;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.wpc-lb-cap{margin:0;max-width:900px;color:var(--paper);font-size:15px;text-align:center}
.wpc-lb-x{position:fixed;top:16px;right:16px;width:44px;height:44px;border-radius:99px;border:2px solid var(--paper);background:var(--ink);color:var(--paper);font-size:24px;line-height:1;cursor:pointer}
.wpc-lb-x:focus-visible{outline:3px solid var(--lime);outline-offset:2px}
html.lb-open{overflow:hidden}
@media (max-width:600px){.wpc-lb{padding:12px}.wpc-lb img{max-height:calc(100dvh - 80px)}}

/* 0.5.13 top pick (Adam, round 34: "the top edge"): the label is a tab sitting on the card's top edge over the
   logo column, so the text column only says the name, the score and one line. The card itself stays a normal pick. */
.wpc-pick.is-top{position:relative;margin-top:44px}
.wpc-pick.is-top .pt .badge{position:absolute;left:16px;top:0;transform:translateY(-50%);margin:0;padding:5px 12px;font-size:11.5px;border-width:2px;border-radius:4px;z-index:1;white-space:nowrap}
@media (max-width:600px){.wpc-pick.is-top{padding-top:30px}}
