/* SalvaLab: hub /salvalab/ and articles, drawn by includes/salvalab.php. On top of merchant.css (sections, heads, hero, buttons).
   Each pillar has its own soft colour (same family as the home chips): --lab-tone on anything with data-pillar. */
.sc-lab [data-pillar] { --lab-tone:#eef1ed; }
.sc-lab [data-pillar="acquisizione"] { --lab-tone:var(--sc-mint-soft); }
.sc-lab [data-pillar="fidelizzazione"] { --lab-tone:#fff1c7; }
.sc-lab [data-pillar="scontrino-medio"] { --lab-tone:#ffe2d1; }

.sc-lab-meta { font-size:14px; color:var(--sc-muted); }
.sc-lab-badge { display:inline-block; justify-self:start; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:800; line-height:1.4; background:var(--lab-tone); color:var(--sc-green); }
.sc-lab-empty { text-align:center; color:var(--sc-muted); padding:28px; border:1px dashed var(--sc-line); border-radius:var(--sc-radius); background:#fff; }

/* Path 1 → 2 → 3 */
.sc-mp-section--lab-path { padding-top:0; }
.sc-lab-path li { display:flex; }
.sc-lab-step { flex:1; display:grid; gap:8px; align-content:start; padding:24px; border-radius:var(--sc-radius); background:var(--lab-tone); color:var(--sc-text); text-decoration:none; border:1px solid transparent; transition:border-color .15s, transform .15s; }
.sc-lab-step:hover { border-color:var(--sc-green); transform:translateY(-2px); color:var(--sc-text); }
.sc-lab-step .sc-mp-step__n { background:var(--sc-green); color:var(--sc-mint); }
.sc-lab-step__name { font-family:var(--sc-font-title); font-size:24px; font-weight:700; line-height:1.15; color:var(--sc-green); }
.sc-lab-step__claim { font-weight:700; }
.sc-lab-step__text { line-height:1.5; }

/* Pillar sections */
.sc-mp-section--lab-pillar { padding-top:40px; padding-bottom:40px; scroll-margin-top:90px; }

/* Article cards */
.sc-lab-card { display:flex; }
.sc-lab-card__link { flex:1; display:grid; grid-template-rows:auto 1fr; background:#fff; border:1px solid var(--sc-line); border-radius:var(--sc-radius); overflow:hidden; color:var(--sc-text); text-decoration:none; transition:border-color .15s, box-shadow .15s; }
.sc-lab-card__link:hover { border-color:var(--sc-green); box-shadow:0 6px 18px rgba(14,64,15,.08); color:var(--sc-text); }
.sc-lab-card__media { aspect-ratio:3 / 2; background:var(--lab-tone); overflow:hidden; }
.sc-lab-card__img { width:100%; height:100%; object-fit:cover; display:block; }
.sc-lab-card__ph { display:grid; place-items:center; height:100%; font-family:var(--sc-font-title); font-size:22px; font-weight:700; color:var(--sc-green); opacity:.7; }
.sc-lab-card__body { display:grid; gap:8px; align-content:start; padding:20px; }
.sc-lab-card__title { font-family:var(--sc-font-title); font-size:20px; font-weight:700; line-height:1.25; }
.sc-lab-card__text { line-height:1.5; color:var(--sc-muted); }

/* Article */
.sc-lab-article { max-width:760px; margin:0 auto; padding:24px 5% 0; box-sizing:content-box; display:grid; gap:28px; }
.sc-lab-article__head { display:grid; gap:14px; }
.sc-lab-article__crumbs a { color:var(--sc-green); text-decoration:none; }
.sc-lab-article__crumbs a:hover { text-decoration:underline; }
.sc-lab-article__title { font-family:var(--sc-font-title); font-size:clamp(30px, 4.4vw, 46px); font-weight:700; line-height:1.15; color:var(--sc-green); }
.sc-lab-article__lead { font-size:20px; line-height:1.55; }
.sc-lab-article__cover { aspect-ratio:3 / 2; border-radius:var(--sc-radius); overflow:hidden; background:var(--lab-tone); }
.sc-lab-article__cover img { width:100%; height:100%; object-fit:cover; display:block; }

/* Body written in the block editor */
.sc-lab-body { font-size:18px; line-height:1.7; }
.sc-lab-body > * + * { margin-top:1.1em; }
.sc-lab-body :where(h2, h3) { font-family:var(--sc-font-title); font-weight:700; line-height:1.2; color:var(--sc-green); margin-top:1.6em; }
.sc-lab-body h2 { font-size:28px; }
.sc-lab-body h3 { font-size:22px; }
.sc-lab-body :where(ul, ol) { padding-left:1.3em; list-style:revert; }
.sc-lab-body li + li { margin-top:.4em; }
.sc-lab-body a { color:var(--sc-green); text-decoration:underline; text-underline-offset:2px; }
.sc-lab-body blockquote { border-left:4px solid var(--sc-mint); padding:4px 0 4px 18px; font-size:20px; font-style:italic; }
.sc-lab-body img { max-width:100%; height:auto; border-radius:var(--sc-radius); }
.sc-lab-body figcaption { font-size:14px; color:var(--sc-muted); margin-top:6px; }
/* Tables (block "Tabella", or pasted from Docs/Word/Excel): thin lines, light green header, alternate rows.
   Wide ones scroll sideways inside their box on the phone instead of pushing the page. */
.sc-lab-body .wp-block-table { margin-left:0; margin-right:0; overflow-x:auto; -webkit-overflow-scrolling:touch; border:1px solid var(--sc-line); border-radius:var(--sc-radius-control); background:#fff; }
.sc-lab-body .wp-block-table table { width:100%; min-width:520px; border-collapse:collapse; font-size:16px; line-height:1.45; margin:0; border:0; }
.sc-lab-body .wp-block-table th, .sc-lab-body .wp-block-table td { padding:12px 14px; text-align:left; vertical-align:top; border:0; border-bottom:1px solid var(--sc-line); }
.sc-lab-body .wp-block-table tr > * + * { border-left:1px solid var(--sc-line); }
.sc-lab-body .wp-block-table thead { border:0; }
.sc-lab-body .wp-block-table thead th, .sc-lab-body .wp-block-table thead td { background:var(--sc-mint-soft); color:var(--sc-green); font-weight:700; border-bottom:1px solid #bfe9cf; }
.sc-lab-body .wp-block-table tbody tr:nth-child(even) > * { background:#faf9f6; }
.sc-lab-body .wp-block-table tbody tr:last-child > * { border-bottom:0; }
.sc-lab-body .wp-block-table figcaption { padding:8px 14px; margin:0; border-top:1px solid var(--sc-line); }

/* "Fallo con…" box under the article */
.sc-lab-tool { display:grid; gap:12px; padding:28px; border-radius:var(--sc-radius); background:var(--sc-green); color:var(--sc-cream); line-height:1.55; }
.sc-lab-tool__title { font-family:var(--sc-font-title); font-size:24px; font-weight:700; color:var(--sc-mint); }
.sc-lab-tool a.sc-ui-btn--primary { background:var(--sc-mint); color:var(--sc-green); border-color:var(--sc-mint); }
.sc-lab-tool a.sc-ui-btn--primary:hover { background:var(--sc-cream); border-color:var(--sc-cream); color:var(--sc-green); }

/* Strip "Impara con SalvaLab" on other pages */
.sc-mp-section--lab-strip .sc-lab-cards { grid-template-columns:repeat(auto-fit, minmax(240px, 380px)); justify-content:center; } /* 1–2 articles stay centred */
.sc-lab-all { text-align:center; }
.sc-lab-all a { color:var(--sc-green); font-weight:700; text-decoration:none; }
.sc-lab-all a:hover { text-decoration:underline; }

.sc-lab-back { text-align:center; padding:36px 5% 64px; }
.sc-lab-back a { color:var(--sc-green); font-weight:700; text-decoration:none; }

@media (max-width: 767px) {
  .sc-lab-article { padding-top:16px; gap:22px; }
  .sc-lab-article__lead { font-size:18px; }
  .sc-lab-body { font-size:17px; }
  .sc-lab-tool { padding:22px; }
  .sc-mp-section--lab-pillar { padding-top:28px; padding-bottom:28px; }
}
