/*
Theme Name: Tazza Giusta
Theme URI: https://tazzagiusta.it/
Author: Tazza Giusta
Description: Lightweight block theme for Tazza Giusta — performance-first, Gutenberg-native, automation-ready.
Version: 0.6.4
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: tazza-giusta
*/

:root {
  --tg-espresso: #1C1917;
  --tg-crema: #F6F3EE;
  --tg-rust: #B4441B;
  --tg-rust-dark: #8A3313;
  --tg-rust-soft: #FBE9DF;
  --tg-sage: #24563E;
  --tg-sage-soft: #E8F1EC;
  --tg-paper: #FFFFFF;
  --tg-ink-soft: #57534E;
  --tg-line: #E7E2DA;
  --tg-font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --tg-font-body: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }
body { text-rendering: optimizeLegibility; }
a { text-underline-offset: .16em; }

.tg-shell { max-width: 1180px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 48px); }
.tg-eyebrow { letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; font-weight: 700; }
.tg-hero { padding-block: clamp(72px, 11vw, 150px); }
.tg-hero h1 { max-width: 900px; text-wrap: balance; }
.tg-hero p { max-width: 720px; }
.tg-section { padding-block: clamp(58px, 8vw, 104px); }
.tg-card {
  border: 1px solid var(--tg-line);
  border-radius: 18px;
  padding: clamp(22px, 3vw, 34px);
  background: var(--tg-paper);
  min-height: 100%;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tg-card:hover { transform: translateY(-2px); border-color: #D8CABB; box-shadow: 0 14px 34px rgba(47,32,25,.07); }
.tg-card a { text-decoration: none; }
.tg-card p { color: var(--tg-ink-soft); }
.tg-pill { border-radius: 999px; }
.tg-rule { border-top: 1px solid var(--tg-line); }
.tg-footer a,
.tg-footer a:visited {
  color: #fff !important;
  text-decoration: none;
}
.tg-footer a:hover,
.tg-footer a:focus-visible {
  color: var(--tg-rust) !important;
  text-decoration: underline;
}
.tg-footer a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 781px) {
  .tg-mobile-stack { gap: 16px !important; }
  .tg-header-row { align-items: flex-start !important; }
}


/* Hub System v0.2 */
.tg-hub-hero {
  padding-block: clamp(58px, 8vw, 104px);
  border-bottom: 1px solid var(--tg-line);
}
.tg-hub-hero .wp-block-post-title { max-width: 900px; }
.tg-hub-hero .wp-block-post-content { max-width: 760px; }
.tg-hub-hero .wp-block-post-content h2 {
  margin-top: 22px;
  margin-bottom: 12px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}
.tg-hub-hero .wp-block-post-content p { color: var(--tg-ink-soft); }
.tg-hub-section { padding-block: clamp(52px, 7vw, 88px); }
.tg-hub-section + .tg-hub-section { border-top: 1px solid var(--tg-line); }
.tg-section-head { margin-bottom: 30px; max-width: 760px; }
.tg-section-head p { color: var(--tg-ink-soft); }
.tg-grid {
  display: grid;
  gap: 20px;
}
.tg-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tg-entity-card,
.tg-editorial-card {
  overflow: hidden;
  border: 1px solid var(--tg-line);
  border-radius: 18px;
  background: var(--tg-paper);
  min-width: 0;
}
.tg-card-media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--tg-crema);
}
.tg-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .25s ease;
}
.tg-entity-card:hover .tg-card-media img,
.tg-editorial-card:hover .tg-card-media img { transform: scale(1.02); }
.tg-card-body { padding: 24px; }
.tg-card-kicker {
  margin: 0 0 10px;
  color: var(--tg-sage);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tg-card-title {
  margin: 0;
  font-family: var(--tg-font-display);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.14;
}
.tg-card-title a { text-decoration: none; }
.tg-card-excerpt { margin: 14px 0 0; color: var(--tg-ink-soft); }
.tg-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 18px;
  color: var(--tg-ink-soft);
  font-size: .78rem;
}
.tg-empty-state {
  border: 1px dashed #CCBFB1;
  border-radius: 18px;
  padding: clamp(26px, 4vw, 42px);
  background: var(--tg-crema);
}
.tg-empty-state strong {
  display: block;
  font-family: var(--tg-font-display);
  font-size: 1.35rem;
}
.tg-empty-state p { margin: 8px 0 0; color: var(--tg-ink-soft); }
.tg-hub-trust {
  border-radius: 22px;
  padding: clamp(30px, 5vw, 52px);
}
.tg-hub-trust p { max-width: 690px; }

@media (max-width: 900px) {
  .tg-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .tg-grid-3 { grid-template-columns: 1fr; }
  .tg-card-body { padding: 20px; }
}

/* Entity Template System v0.4 */
.tg-entity-view { background: var(--tg-paper); }
.tg-entity-hero { padding-block: clamp(42px, 7vw, 88px); background: var(--tg-crema); border-bottom: 1px solid var(--tg-line); }
.tg-breadcrumb { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:clamp(34px,5vw,58px); font-size:.82rem; color:var(--tg-ink-soft); }
.tg-breadcrumb a { color:inherit; text-decoration:none; }
.tg-entity-hero-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr); gap:clamp(34px,6vw,84px); align-items:center; }
.tg-entity-hero h1 { margin:.25em 0 .35em; font-family:var(--tg-font-display); font-size:clamp(2.8rem,6vw,5.6rem); line-height:.98; letter-spacing:-.035em; }
.tg-entity-deck { max-width:720px; font-size:clamp(1.05rem,1.7vw,1.3rem); color:var(--tg-ink-soft); }
.tg-entity-deck a { font-weight:700; }
.tg-entity-media { min-height:320px; border-radius:24px; overflow:hidden; background:#eee5d8; }
.tg-entity-media img { display:block; width:100%; height:100%; min-height:320px; object-fit:cover; }
.tg-entity-placeholder { min-height:360px; display:flex; align-items:center; justify-content:center; padding:30px; color:var(--tg-sage); font-family:var(--tg-font-display); font-size:1.5rem; background:linear-gradient(145deg,#efe4d6,#fbf6ef); }
.tg-entity-badges { display:flex; flex-wrap:wrap; gap:8px; margin-top:24px; }
.tg-entity-badges span { border:1px solid #d7cabd; background:rgba(255,255,255,.55); padding:7px 12px; border-radius:999px; font-size:.78rem; font-weight:650; }
.tg-entity-badges .tg-workflow-green { border-color:#9db09b; }
.tg-entity-badges .tg-workflow-red { border-color:#c99084; }
.tg-entity-section { padding-block:clamp(56px,8vw,98px); border-bottom:1px solid var(--tg-line); }
.tg-entity-section h2 { margin:.2em 0 .35em; font-size:clamp(2rem,4vw,3.25rem); }
.tg-section-intro { color:var(--tg-ink-soft); max-width:700px; margin-bottom:30px; }
.tg-entity-two-col { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(280px,.55fr); gap:clamp(32px,6vw,80px); align-items:start; }
.tg-reading-width { max-width:820px; }
.tg-spec-table { border-top:1px solid var(--tg-line); }
.tg-spec-row { display:grid; grid-template-columns:minmax(160px,.75fr) minmax(0,1.25fr); gap:24px; padding:15px 0; border-bottom:1px solid var(--tg-line); }
.tg-spec-label { color:var(--tg-ink-soft); font-size:.9rem; }
.tg-spec-value { font-weight:650; }
.tg-price-panel { position:sticky; top:28px; padding:28px; border:1px solid var(--tg-line); border-radius:20px; background:var(--tg-crema); }
.tg-price { margin:8px 0 0; font-family:var(--tg-font-display); font-weight:700; font-size:2.3rem; }
.tg-price-sub, .tg-microcopy { color:var(--tg-ink-soft); font-size:.82rem; }
.tg-button { display:inline-block; background:var(--tg-espresso); color:#fff !important; padding:12px 20px; border-radius:999px; text-decoration:none; font-weight:700; }
.tg-prose { font-size:1.08rem; }
.tg-prose > * + * { margin-top:1.1em; }
.tg-lab-state { border:1px solid var(--tg-line); border-radius:22px; background:var(--tg-crema); padding:clamp(28px,4vw,46px); }
.tg-lab-state-ok { background:#eef1ea; border-color:#ccd5c7; }
.tg-lab-state h3 { font-family:var(--tg-font-display); font-size:clamp(1.7rem,3vw,2.4rem); margin:.25em 0; }
.tg-text-link { font-weight:750; text-decoration:none; }
.tg-transparency { background:var(--tg-espresso); color:#fff; border-radius:24px; padding:clamp(30px,5vw,54px); }
.tg-transparency h2 { color:#fff; }
.tg-transparency p { color:#eadfd8; max-width:760px; }
.tg-source-links { display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.tg-source-links a { color:#fff; border:1px solid rgba(255,255,255,.35); padding:9px 14px; border-radius:999px; text-decoration:none; font-size:.84rem; font-weight:650; }
.tg-disclosure { margin-top:30px; padding:18px 20px; border-left:4px solid var(--tg-rust); background:var(--tg-crema); }

@media (max-width: 820px) {
  .tg-entity-hero-grid, .tg-entity-two-col { grid-template-columns:1fr; }
  .tg-entity-media { order:-1; min-height:240px; }
  .tg-entity-media img, .tg-entity-placeholder { min-height:240px; }
  .tg-price-panel { position:static; }
}
@media (max-width: 560px) {
  .tg-spec-row { grid-template-columns:1fr; gap:5px; }
  .tg-entity-hero h1 { font-size:clamp(2.5rem,13vw,4.2rem); }
}


/* Media Provenance Layer v1 */
.tg-card-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  text-align: center;
  color: var(--tg-sage);
  background: linear-gradient(145deg,#efe4d6,#fbf6ef);
  font-family: var(--tg-font-display);
  font-size: 1.05rem;
}
.tg-entity-card .tg-card-media img {
  object-fit: contain;
  box-sizing: border-box;
  padding: 18px;
  background: #fff;
}
.tg-editorial-card .tg-card-media img { object-fit: cover; padding: 0; }
.tg-entity-media-wrap { min-width: 0; }
.tg-entity-media img {
  object-fit: contain;
  box-sizing: border-box;
  padding: clamp(18px,3vw,34px);
  background: #fff;
}
.tg-image-credit {
  margin: 9px 4px 0;
  color: var(--tg-ink-soft);
  font-size: .74rem;
  line-height: 1.35;
}


/* Review Sentiment Layer v1 */
.tg-sentiment-shell { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr); gap:clamp(30px,5vw,70px); align-items:start; }
.tg-sentiment-summary { font-size:clamp(1.05rem,1.7vw,1.25rem); line-height:1.65; color:var(--tg-ink-soft); max-width:760px; }
.tg-sentiment-meta { display:flex; flex-wrap:wrap; gap:8px; margin:22px 0 0; }
.tg-sentiment-meta span { border:1px solid var(--tg-line); background:#fff; padding:7px 11px; border-radius:999px; font-size:.78rem; font-weight:650; }
.tg-sentiment-groups { display:grid; gap:14px; }
.tg-sentiment-card { border:1px solid var(--tg-line); border-radius:18px; background:#fff; padding:22px 24px; }
.tg-sentiment-card h3 { margin:0 0 10px; font-family:var(--tg-font-display); font-size:1.35rem; }
.tg-sentiment-card ul { margin:0; padding-left:1.15rem; }
.tg-sentiment-card li + li { margin-top:.45rem; }
.tg-sentiment-card-positive { border-left:4px solid #75806F; }
.tg-sentiment-card-negative { border-left:4px solid #B85C38; }
.tg-sentiment-card-mixed { border-left:4px solid #b89668; }
.tg-sentiment-disclosure { margin-top:28px; padding:16px 18px; border-radius:14px; background:var(--tg-crema); color:var(--tg-ink-soft); font-size:.86rem; line-height:1.55; }
.tg-sentiment-sources { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.tg-sentiment-sources a { font-size:.78rem; font-weight:650; }
@media (max-width:820px) { .tg-sentiment-shell { grid-template-columns:1fr; } }

/* Review Sentiment Layer v2 */
.tg-sentiment-card li { display:flex; gap:10px; align-items:flex-start; justify-content:space-between; }
.tg-sentiment-theme-text { flex:1 1 auto; }
.tg-evidence-badge { flex:0 0 auto; display:inline-flex; align-items:center; border:1px solid var(--tg-line); background:var(--tg-crema); border-radius:999px; padding:3px 7px; font-size:.68rem; line-height:1.2; white-space:nowrap; color:var(--tg-ink-soft); font-weight:700; }
.tg-sentiment-sources a { display:inline-flex; align-items:center; gap:4px; padding:5px 8px; border:1px solid var(--tg-line); border-radius:999px; background:#fff; text-decoration:none; }
.tg-sentiment-sources a:hover { border-color:var(--tg-rust); }
@media (max-width:600px) { .tg-sentiment-card li { display:block; } .tg-evidence-badge { margin-top:6px; } }


/* Answer Layer v1 — concise, user-first blocks for machine entities */
.tg-entity-quick { padding:clamp(24px,3vw,42px) 0 0; background:var(--tg-paper); }
.tg-quick-card { border:1px solid var(--tg-line); background:#fff; border-radius:18px; padding:clamp(22px,3vw,30px); }
.tg-quick-card h2 { margin:.25rem 0 .6rem; font-size:clamp(1.55rem,2.7vw,2.15rem); }
.tg-quick-summary { margin:0; color:var(--tg-ink-soft); font-size:1.02rem; line-height:1.65; max-width:920px; }
.tg-decision-section { background:#fff; }
.tg-decision-summary { max-width:860px; color:var(--tg-ink-soft); font-size:1.05rem; line-height:1.65; }
.tg-decision-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:24px; }
.tg-decision-card { border:1px solid var(--tg-line); border-radius:18px; padding:22px 24px; background:var(--tg-paper); }
.tg-decision-card h3 { margin:0 0 10px; font-family:var(--tg-font-display); font-size:1.35rem; }
.tg-decision-card ul { margin:0; padding-left:1.15rem; }
.tg-decision-card li + li { margin-top:.45rem; }
.tg-decision-yes { border-left:4px solid var(--tg-sage); }
.tg-decision-alt { border-left:4px solid #b89668; }
.tg-decision-note { margin:18px 0 0; color:var(--tg-ink-soft); font-size:.82rem; line-height:1.55; }
.tg-reading-width-wide { max-width:980px; }
.tg-faq-list { border-top:1px solid var(--tg-line); margin-top:26px; }
.tg-faq-item { border-bottom:1px solid var(--tg-line); }
.tg-faq-item summary { cursor:pointer; padding:18px 2px; font-weight:700; list-style-position:outside; }
.tg-faq-item > div { padding:0 2px 18px; color:var(--tg-ink-soft); line-height:1.65; max-width:850px; }
.tg-faq-item p { margin:0; }
.tg-sentiment-more-sources { width:100%; margin-top:4px; }
.tg-sentiment-more-sources summary { cursor:pointer; display:inline-flex; padding:5px 8px; border:1px solid var(--tg-line); border-radius:999px; background:#fff; font-size:.78rem; font-weight:700; }
.tg-sentiment-more-sources-list { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
@media (max-width:700px) { .tg-decision-grid { grid-template-columns:1fr; } }


/* Machine Template v1.1 */
.tg-machine-spec-section {
  padding-block: clamp(38px,5vw,64px);
}
.tg-machine-spec-section .tg-section-intro {
  margin-bottom: 20px;
}
.tg-spec-compact {
  margin-top: 18px;
}
.tg-spec-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.tg-spec-tile {
  min-width:0;
  border:1px solid var(--tg-line);
  border-radius:14px;
  background:#fff;
  padding:14px 16px;
}
.tg-spec-tile-label {
  display:block;
  margin-bottom:5px;
  color:var(--tg-ink-soft);
  font-size:.76rem;
  letter-spacing:.02em;
}
.tg-spec-tile strong {
  display:block;
  font-size:.98rem;
  line-height:1.35;
}
.tg-spec-more {
  margin-top:12px;
  border-top:1px solid var(--tg-line);
}
.tg-spec-more > summary {
  cursor:pointer;
  padding:14px 2px;
  color:var(--tg-espresso);
  font-size:.86rem;
  font-weight:750;
}
.tg-spec-more .tg-spec-table {
  margin-bottom:4px;
}
.tg-spec-more .tg-spec-row {
  padding:10px 0;
}

.tg-glance-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:18px;
}
.tg-glance-item {
  border:1px solid var(--tg-line);
  border-radius:14px;
  background:var(--tg-crema);
  padding:14px 16px;
  min-width:0;
}
.tg-glance-item span {
  display:block;
  margin-bottom:5px;
  color:var(--tg-ink-soft);
  font-size:.72rem;
  font-weight:750;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.tg-glance-item strong {
  display:block;
  font-size:.94rem;
  line-height:1.4;
}

.tg-alternatives {
  margin-top:34px;
  padding-top:30px;
  border-top:1px solid var(--tg-line);
}
.tg-alternatives-head {
  max-width:760px;
  margin-bottom:18px;
}
.tg-alternatives-head h3 {
  margin:.15rem 0 .35rem;
  font-family:var(--tg-font-display);
  font-size:clamp(1.55rem,2.6vw,2.1rem);
}
.tg-alternatives-head > p:last-child {
  margin-bottom:0;
  color:var(--tg-ink-soft);
}
.tg-alt-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.tg-alt-card {
  overflow:hidden;
  border:1px solid var(--tg-line);
  border-radius:18px;
  background:#fff;
  min-width:0;
}
.tg-alt-media {
  display:block;
  aspect-ratio:4/3;
  overflow:hidden;
  background:var(--tg-crema);
  text-decoration:none;
}
.tg-alt-media img {
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  background:#fff;
}
.tg-alt-placeholder {
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  color:var(--tg-sage);
  font-size:.86rem;
}
.tg-alt-body {
  padding:18px;
}
.tg-alt-badges {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-bottom:10px;
}
.tg-alt-badges span {
  border:1px solid var(--tg-line);
  border-radius:999px;
  padding:4px 7px;
  color:var(--tg-ink-soft);
  font-size:.65rem;
  font-weight:750;
  letter-spacing:.03em;
}
.tg-alt-card h3 {
  margin:0 0 8px;
  font-size:1.05rem;
  line-height:1.25;
}
.tg-alt-card h3 a {
  color:inherit;
  text-decoration:none;
}
.tg-alt-price {
  margin:0 0 10px;
  color:var(--tg-ink-soft);
  font-size:.82rem;
}
.tg-decision-note {
  margin-top:22px;
}

@media (max-width:820px) {
  .tg-glance-grid,
  .tg-alt-grid {
    grid-template-columns:1fr 1fr;
  }
}
@media (max-width:600px) {
  .tg-spec-grid,
  .tg-glance-grid,
  .tg-alt-grid {
    grid-template-columns:1fr;
  }
}


/* v0.4.6 — Machine compact vertical rhythm
   Reduces dead space between the main information blocks while preserving
   breathing room inside cards and on smaller screens. */
.single-tg_machine .tg-entity-section,
.post-type-tg_machine .tg-entity-section,
.tg-entity-view.tg-machine-view .tg-entity-section {
  padding-block: clamp(30px, 3.8vw, 52px);
}

/* The machine template is rendered through the shared entity view, so this
   selector catches the current markup without changing other entity types. */
body.single-tg_machine .tg-entity-section {
  padding-block: clamp(30px, 3.8vw, 52px);
}

body.single-tg_machine .tg-machine-spec-section {
  padding-block: clamp(28px, 3.4vw, 46px);
}

body.single-tg_machine .tg-entity-quick {
  padding: clamp(22px, 2.8vw, 34px) 0 clamp(24px, 3vw, 38px);
}

body.single-tg_machine .tg-decision-section,
body.single-tg_machine .tg-sentiment-section,
body.single-tg_machine .tg-faq-section {
  padding-block: clamp(32px, 4vw, 54px);
}

body.single-tg_machine .tg-alternatives {
  margin-top: 24px;
  padding-top: 22px;
}

body.single-tg_machine .tg-decision-grid {
  margin-top: 18px;
}

body.single-tg_machine .tg-sentiment-meta {
  margin-top: 16px;
}

body.single-tg_machine .tg-sentiment-disclosure {
  margin-top: 18px;
}

body.single-tg_machine .tg-faq-list {
  margin-top: 18px;
}

body.single-tg_machine .tg-entity-section + .tg-entity-section {
  margin-top: 0;
}

@media (max-width: 700px) {
  body.single-tg_machine .tg-entity-section,
  body.single-tg_machine .tg-decision-section,
  body.single-tg_machine .tg-sentiment-section,
  body.single-tg_machine .tg-faq-section {
    padding-block: 28px;
  }
  body.single-tg_machine .tg-machine-spec-section {
    padding-block: 26px;
  }
  body.single-tg_machine .tg-entity-quick {
    padding: 20px 0 28px;
  }
}


/* Affiliate Layer v1 */
.tg-amazon-cta { display:flex; flex-wrap:wrap; align-items:center; gap:10px 12px; margin-top:18px; }
.tg-amazon-button {
  display:inline-flex; align-items:center; justify-content:center;
  min-height:46px; padding:12px 20px; border-radius:999px;
  background:#E9A23B; color:#24170F !important; text-decoration:none;
  font-weight:800; border:1px solid #D18C2C;
  box-shadow:0 5px 14px rgba(47,32,25,.08);
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.tg-amazon-button:hover { transform:translateY(-1px); background:#F0B04A; box-shadow:0 8px 18px rgba(47,32,25,.12); }
.tg-amazon-button:focus-visible { outline:3px solid rgba(184,92,56,.35); outline-offset:3px; }
.tg-affiliate-label { color:var(--tg-ink-soft); font-size:.74rem; }
.tg-amazon-cta-decision { margin:20px 0 2px; }
.tg-affiliate-disclosure { color:var(--tg-crema); opacity:.82; font-size:.76rem; line-height:1.5; max-width:760px; margin:20px 0 0; }

/* Alternative image relevance gate */
.tg-alt-placeholder { text-align:center; padding-inline:16px; }


/* Affiliate Layer v1.1 */
.tg-affiliate-label { color:var(--tg-ink-soft); font-size:.74rem; font-weight:600; }

/* Back to top */
.tg-back-to-top {
  position: fixed;
  right: clamp(16px, 2.6vw, 28px);
  bottom: clamp(18px, 3vw, 30px);
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  min-height: 48px;
  background: rgba(47,32,25,.92);
  color: #fff;
  box-shadow: 0 10px 26px rgba(25,17,13,.20);
  cursor: pointer;
  transform: translateY(18px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, box-shadow .22s ease, background .22s ease;
}
.tg-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.tg-back-to-top.is-near-end {
  background: rgba(184,92,56,.96);
  box-shadow: 0 12px 28px rgba(184,92,56,.28);
}
.tg-back-to-top:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(25,17,13,.24); }
.tg-back-to-top:focus-visible { outline: 3px solid rgba(184,92,56,.28); outline-offset: 3px; }
.tg-back-to-top-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  font-size: 1rem;
  line-height: 1;
}
.tg-back-to-top-text { font-weight: 800; letter-spacing: .01em; }
@media (max-width: 700px) {
  .tg-back-to-top { padding: 11px 14px; min-height: 44px; }
  .tg-back-to-top-text { font-size: .94rem; }
}

/* Global Header v0.4.11 — one markup for every frontend template */

/*
 * Site Editor may keep legacy header markup inside DB-stored template overrides.
 * The canonical .tg-site-header is injected via wp_body_open; every other
 * frontend <header> is suppressed so Home, hubs and entities cannot diverge.
 */
body:not(.wp-admin) header:not(.tg-site-header) {
  display: none !important;
}

.tg-site-header {
  position: relative;
  z-index: 1000;
  width: 100%;
  background: var(--tg-paper);
  border-bottom: 1px solid var(--tg-line);
}

.tg-site-header__inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 66px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.tg-site-header__brand,
.tg-mobile-menu__brand {
  display: inline-flex;
  align-items: center;
  color: var(--tg-espresso);
  text-decoration: none;
}

.tg-site-header__brand {
  flex: 0 0 auto;
}

.tg-site-header__brand-image,
.tg-mobile-menu__brand-image {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
}

.tg-site-header__brand-image {
  width: clamp(158px, 14vw, 190px);
  max-height: 30px;
}

.tg-mobile-menu__brand-image {
  width: 168px;
  max-height: 27px;
}

.tg-site-header__desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px,2vw,30px);
  margin-left: auto;
}

.tg-site-header__desktop-nav a {
  color: var(--tg-espresso);
  text-decoration: none;
  white-space: nowrap;
  font-size: .96rem;
  font-weight: 650;
}

.tg-site-header__desktop-nav a:hover,
.tg-site-header__desktop-nav a:focus-visible {
  color: var(--tg-rust);
}

.tg-site-header__desktop-nav a:focus-visible,
.tg-site-header__menu-toggle:focus-visible,
.tg-mobile-menu__close:focus-visible,
.tg-mobile-menu a:focus-visible {
  outline: 3px solid rgba(184,92,56,.25);
  outline-offset: 3px;
}

.tg-site-header__collabora {
  border: 1px solid var(--tg-line);
  border-radius: 999px;
  padding: 8px 14px;
}

.tg-site-header__menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--tg-line);
  border-radius: 999px;
  background: var(--tg-paper);
  color: var(--tg-espresso);
  cursor: pointer;
}

.tg-site-header__menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 2px;
}

.tg-mobile-menu[hidden] {
  display: none !important;
}

.tg-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99999;
  overflow-y: auto;
  background: var(--tg-crema);
  color: var(--tg-espresso);
}

.tg-mobile-menu__shell {
  width: min(100%, 680px);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  padding: 20px 24px 28px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.tg-mobile-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #ded0c2;
}

.tg-mobile-menu__brand {
  font-size: 1.18rem;
}

.tg-mobile-menu__close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #ddcfc1;
  border-radius: 999px;
  background: var(--tg-paper);
  color: var(--tg-espresso);
  font: inherit;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.tg-mobile-menu__nav {
  margin-top: 28px;
}

.tg-mobile-menu__nav > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 20px 2px;
  box-sizing: border-box;
  border-bottom: 1px solid #e4d8cc;
  color: var(--tg-espresso);
  text-decoration: none;
  font-family: var(--tg-font-display);
  font-size: clamp(1.75rem,8vw,2.35rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.025em;
}

.tg-mobile-menu__nav > a > span:last-child {
  color: var(--tg-rust);
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
}

.tg-mobile-menu__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 32px;
  padding-top: 0;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.tg-mobile-menu__actions a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  box-sizing: border-box;
  border-radius: 999px;
  text-decoration: none;
  text-align: center;
  font-size: .92rem;
  font-weight: 800;
}

.tg-mobile-menu__newsletter {
  background: var(--tg-espresso);
  color: #fff !important;
}

.tg-mobile-menu__collabora {
  border: 1px solid #d8c8ba;
  background: var(--tg-paper);
  color: var(--tg-espresso) !important;
}

html.tg-mobile-menu-open,
body.tg-mobile-menu-open {
  overflow: hidden !important;
}

@media (max-width: 781px) {
  .tg-site-header__inner {
    width: calc(100% - 28px);
    min-height: 62px;
  }

  .tg-site-header__brand-image {
    width: 150px;
    max-height: 25px;
  }

  .tg-site-header__desktop-nav {
    display: none !important;
  }

  .tg-site-header__menu-toggle {
    display: block;
  }
}

@media (min-width: 782px) {
  .tg-mobile-menu {
    display: none !important;
  }
}


/* Machine hub editorial bridge v0.4.15 */
.tg-machine-hub-editorial-intro {
  margin-bottom: clamp(28px, 4vw, 52px);
}
.tg-machine-hub-editorial-intro > :first-child { margin-top: 0; }
.tg-machine-hub-editorial-intro > :last-child { margin-bottom: 0; }

/* ==========================================================================
   Fresh v0.5.0 — lighter look, one strong accent, products first.
   Overrides earlier rules; tokens live in :root at the top of this file.
   ========================================================================== */

body { font-family: var(--tg-font-body); color: var(--tg-espresso); background: var(--tg-paper); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .wp-block-heading, .wp-block-post-title, .wp-block-site-title { font-family: var(--tg-font-display); font-weight: 800; letter-spacing: -0.025em; }
.tg-eyebrow { letter-spacing: .06em; font-size: .78rem; color: var(--tg-ink-soft); }
:focus-visible { outline: 3px solid rgba(180, 68, 27, .45); outline-offset: 3px; }

/* Shared building blocks */
.tg-wrap { max-width: 1200px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 24px); box-sizing: border-box; }
.tg-block { padding-top: clamp(56px, 8vw, 88px); }
.tg-block--last { padding-bottom: clamp(56px, 8vw, 88px); }
.tg-block__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; margin-bottom: 28px; }
.tg-block__head .tg-sub { margin-bottom: 0; }
.tg-h2 { font-family: var(--tg-font-display); font-weight: 800; font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.1; letter-spacing: -0.025em; margin: 0; }
.tg-sub { color: var(--tg-ink-soft); margin: 10px 0 28px; max-width: 640px; font-size: 1.05rem; }
.tg-more { font-weight: 700; text-decoration: none; white-space: nowrap; }
.tg-more:hover { color: var(--tg-rust); }
.tg-chip { display: inline-block; margin: 0 0 20px; padding: 6px 12px; border-radius: 999px; background: var(--tg-rust-soft); color: var(--tg-rust-dark); font-weight: 700; font-size: .875rem; }
.tg-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.tg-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none; box-sizing: border-box; transition: transform .15s ease, background-color .15s ease; }
.tg-btn:hover { transform: translateY(-1px); }
.tg-btn--primary, .tg-btn--primary:visited { background: var(--tg-rust); color: #fff !important; }
.tg-btn--primary:hover { background: var(--tg-rust-dark); }
.tg-btn--ghost, .tg-btn--ghost:visited { background: #fff; color: var(--tg-espresso) !important; border: 1.5px solid var(--tg-espresso); }
.tg-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 700; line-height: 1.3; background: var(--tg-crema); color: #44403C; border: 0; }
.tg-badge--fit { background: var(--tg-sage-soft); color: var(--tg-sage); }

/* Buttons from blocks and older markup */
.wp-element-button, .wp-block-button__link { background: var(--tg-espresso); color: #fff; border-radius: 999px; font-weight: 700; }
.tg-button { background: var(--tg-espresso); }
body .tg-amazon-button { box-sizing: border-box; max-width: 100%; white-space: normal; text-align: center; background: var(--tg-rust); color: #fff !important; border-radius: 999px; min-height: 52px; padding: 10px 24px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.0625rem; text-decoration: none; box-shadow: none; }
body .tg-amazon-button:hover { background: var(--tg-rust-dark); box-shadow: none; }
.tg-affiliate-label { font-size: .8125rem; color: var(--tg-ink-soft); }

/* Header */
/* No backdrop-filter here: it would trap the fixed mobile menu inside the header box. */
.tg-site-header { position: sticky; top: 0; background: #fff; border-bottom: 1px solid #EFEAE3; }
.admin-bar .tg-site-header { top: 32px; }
.tg-site-header__inner { width: min(1152px, calc(100% - 32px)); min-height: 72px; }
.tg-wordmark { font-family: var(--tg-font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; color: var(--tg-espresso); line-height: 1; }
.tg-wordmark span { color: var(--tg-rust); }
.tg-site-header__desktop-nav { gap: 4px; align-items: center; }
.tg-site-header__desktop-nav a { font-weight: 600; font-size: 1rem; padding: 10px 12px; color: var(--tg-espresso); border-radius: 10px; }
.tg-site-header__desktop-nav a:hover { color: var(--tg-rust); background: transparent; }
.tg-site-header__desktop-nav a.tg-site-header__cta { margin-left: 8px; background: var(--tg-espresso); color: #fff; border-radius: 999px; padding: 11px 18px; font-size: .9375rem; font-weight: 700; }
.tg-site-header__desktop-nav a.tg-site-header__cta:hover { background: var(--tg-rust); color: #fff; }
.tg-mobile-menu__brand .tg-wordmark { font-size: 1.375rem; }
.tg-mobile-menu__nav > a { font-family: var(--tg-font-display); font-weight: 700; }
.tg-mobile-menu__actions a.tg-mobile-menu__finder { background: var(--tg-rust); color: #fff; border-color: var(--tg-rust); grid-column: 1 / -1; }

/* Home */
.tg-home-hero { background: var(--tg-crema); }
.tg-home-hero__inner { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(32px, 5vw, 56px); padding-top: clamp(40px, 7vw, 72px); padding-bottom: clamp(48px, 7vw, 80px); }
.tg-home-hero__copy { flex: 1 1 440px; min-width: 0; }
.tg-home-hero__media { flex: 1 1 400px; min-width: 0; }
.tg-home-hero__media img { display: block; width: 100%; height: clamp(260px, 36vw, 460px); object-fit: cover; border-radius: 28px; }
.tg-home-hero__title { font-family: var(--tg-font-display); font-weight: 800; font-size: clamp(2.4rem, 5.4vw, 4.25rem); line-height: 1.02; letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
.tg-home-hero__lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: #44403C; margin: 22px 0 0; max-width: 560px; }

.tg-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.tg-path { display: flex; flex-direction: column; gap: 10px; padding: 28px; border: 1px solid var(--tg-line); border-radius: 20px; background: #fff; text-decoration: none; color: var(--tg-espresso); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.tg-path:hover { transform: translateY(-2px); border-color: #D6CFC4; box-shadow: 0 12px 28px rgba(28, 25, 23, .07); color: var(--tg-espresso); }
.tg-path__icon { color: var(--tg-rust); }
.tg-path__title { font-family: var(--tg-font-display); font-weight: 800; font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.02em; }
.tg-path__copy { color: var(--tg-ink-soft); }
.tg-path__more { margin-top: auto; padding-top: 10px; font-weight: 700; color: var(--tg-rust); }

.tg-pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.tg-pcard { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--tg-line); border-radius: 20px; background: #fff; text-decoration: none; color: var(--tg-espresso); transition: transform .15s ease, box-shadow .15s ease; }
.tg-pcard:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(28, 25, 23, .07); color: var(--tg-espresso); }
.tg-pcard__media { display: flex; align-items: center; justify-content: center; height: 200px; margin-bottom: 8px; border-radius: 14px; background: var(--tg-crema); overflow: hidden; }
.tg-pcard__media img { max-width: 80%; max-height: 170px; width: auto; height: auto; object-fit: contain; mix-blend-mode: multiply; }
.tg-pcard .tg-badge { align-self: flex-start; }
.tg-pcard__title { font-weight: 700; font-size: 1.125rem; line-height: 1.3; }
.tg-pcard__fit { color: var(--tg-ink-soft); font-size: .9375rem; }
.tg-pcard__foot { margin-top: auto; padding-top: 12px; border-top: 1px solid #EFEAE3; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tg-pcard__price { display: block; font-size: 1.25rem; }
.tg-pcard__note { display: block; font-size: .8125rem; color: var(--tg-ink-soft); }
.tg-pcard__go { font-weight: 700; color: var(--tg-rust); white-space: nowrap; }

.tg-topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 28px; }
.tg-topic { display: flex; flex-direction: column; border: 1px solid var(--tg-line); border-radius: 20px; overflow: hidden; background: #fff; text-decoration: none; color: var(--tg-espresso); transition: transform .15s ease, box-shadow .15s ease; }
.tg-topic:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(28, 25, 23, .07); color: var(--tg-espresso); }
.tg-topic img { display: block; width: 100%; height: 180px; object-fit: cover; }
.tg-topic__body { display: flex; flex-direction: column; gap: 4px; padding: 20px; }
.tg-topic__title { font-family: var(--tg-font-display); font-weight: 800; font-size: 1.375rem; letter-spacing: -0.02em; }
.tg-topic__copy { color: var(--tg-ink-soft); }

.tg-trust { display: flex; flex-wrap: wrap; gap: 24px 40px; padding: clamp(28px, 5vw, 48px); border-radius: 28px; background: var(--tg-espresso); color: #F6F3EE; }
.tg-trust__head { flex: 1 1 300px; }
.tg-trust__head .tg-h2 { color: #fff; }
.tg-trust__head p { color: #D6D3D1; margin: 12px 0 0; }
.tg-trust__points { flex: 2 1 520px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; }
.tg-trust__points strong { display: block; color: #fff; margin-bottom: 4px; }
.tg-trust__points span { color: #D6D3D1; }
.tg-trust__link { flex-basis: 100%; margin: 0; }
.tg-trust__link a { color: #fff; font-weight: 700; }

/* Hub pages (Macchine, Macinacaffè, Caffè, Guide…) */
.tg-hub-hero { padding-block: clamp(36px, 6vw, 64px); background: #fff !important; }
.tg-hub-hero .wp-block-post-title { font-size: clamp(2.25rem, 4.4vw, 3.5rem); line-height: 1.05; letter-spacing: -0.03em; }
.tg-hub-hero .tg-eyebrow { display: none; }

/* Product page */
.tg-entity-view { background: #fff; }
.tg-entity-hero { background: #fff; border-bottom: 0; padding-block: clamp(20px, 3vw, 32px) clamp(16px, 3vw, 32px); }
.tg-breadcrumb { margin-bottom: 20px; font-size: .875rem; }
.tg-breadcrumb a:hover { color: var(--tg-rust); }
.tg-entity-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
.tg-entity-media { min-height: 0; aspect-ratio: 1 / 1; max-height: 500px; border-radius: 28px; background: var(--tg-crema); display: flex; align-items: center; justify-content: center; }
.tg-entity-media img { width: 78%; height: 78%; min-height: 0; object-fit: contain; mix-blend-mode: multiply; }
.tg-entity-brand { margin: 0; font-weight: 700; color: var(--tg-ink-soft); }
.tg-entity-hero h1 { font-family: var(--tg-font-display); font-weight: 800; font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.06; letter-spacing: -0.03em; margin: 6px 0 0; text-wrap: balance; }
.tg-entity-badges { margin-top: 16px; }
.tg-entity-badges span.tg-badge { border: 0; padding: 6px 12px; font-size: .875rem; }
.tg-entity-deck { margin: 20px 0 0; font-size: 1.125rem; color: #44403C; max-width: none; }
.tg-entity-deck strong { color: var(--tg-espresso); }
.tg-entity-hero .tg-price-panel { position: static; margin-top: 24px; padding: 24px; border: 0; border-radius: 20px; background: var(--tg-crema); }
.tg-price { font-family: var(--tg-font-display); font-weight: 800; font-size: clamp(2rem, 3vw, 2.5rem); letter-spacing: -0.02em; margin: 0; }
.tg-price-sub { margin: 4px 0 0; }
.tg-entity-hero .tg-amazon-cta { flex-direction: column; align-items: stretch; text-align: center; gap: 8px; margin-top: 16px; }
.tg-entity-hero .tg-amazon-button { width: 100%; }
.tg-entity-honesty { margin: 16px 0 0; font-size: .9375rem; color: var(--tg-ink-soft); }
.tg-entity-honesty a { color: inherit; font-weight: 700; }
.tg-image-credit { text-align: center; }

.tg-entity-section { padding-block: clamp(40px, 6vw, 64px); border-bottom: 0; }
.tg-entity-section h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin: 0 0 20px; }
.tg-entity-section.has-crema-background-color { background: #fff !important; }
.tg-section-intro { margin-top: -8px; }

.tg-decision-section { background: #fff; }
.tg-decision-grid { gap: 20px; }
.tg-decision-card { border: 0; border-radius: 20px; padding: 26px 28px; }
.tg-decision-card h3 { font-family: var(--tg-font-body); font-weight: 800; font-size: 1.1875rem; letter-spacing: 0; }
.tg-decision-yes { background: var(--tg-sage-soft); border-left: 0; }
.tg-decision-yes h3 { color: var(--tg-sage); }
.tg-decision-alt { background: var(--tg-rust-soft); border-left: 0; }
.tg-decision-alt h3 { color: var(--tg-rust-dark); }
.tg-decision-card li + li { margin-top: .6rem; }

.tg-sentiment-section { background: #fff; }
.tg-sentiment-summary { color: #44403C; }
.tg-sentiment-card { border-radius: 20px; border: 0; background: var(--tg-crema); }
.tg-sentiment-card h3 { font-family: var(--tg-font-body); font-weight: 800; font-size: 1.125rem; letter-spacing: 0; }
.tg-sentiment-card-positive { border-left: 0; background: var(--tg-sage-soft); }
.tg-sentiment-card-positive h3 { color: var(--tg-sage); }
.tg-sentiment-card-negative { border-left: 0; background: var(--tg-rust-soft); }
.tg-sentiment-card-negative h3 { color: var(--tg-rust-dark); }
.tg-sentiment-card-mixed { border-left: 0; }
.tg-evidence-badge { background: #fff; border: 0; }
.tg-sentiment-disclosure { background: var(--tg-crema); }

.tg-entity-quick { padding-top: clamp(40px, 6vw, 64px); }
.tg-quick-card { border: 0; padding: 0; background: transparent; }
.tg-glance-item, .tg-spec-tile { border: 1px solid var(--tg-line) !important; background: #fff !important; border-radius: 16px !important; }

.tg-faq-list { border-top: 0; display: grid; gap: 10px; }
.tg-faq-item { border: 1px solid var(--tg-line); border-radius: 16px; background: #fff; }
.tg-faq-item summary { padding: 18px 22px; font-size: 1.0625rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.tg-faq-item summary::-webkit-details-marker { display: none; }
.tg-faq-item summary::after { content: "+"; font-weight: 700; color: var(--tg-rust); font-size: 1.25rem; line-height: 1; }
.tg-faq-item[open] summary::after { content: "−"; }
.tg-faq-item > div { padding: 0 22px 20px; }

.tg-alternatives-section .tg-alternatives { margin: 0; padding: 0; border: 0; background: transparent; }
.tg-alternatives-head h2 { margin-bottom: 8px; }
.tg-alt-card { border-radius: 20px; }
.tg-alt-media { background: var(--tg-crema); }
.tg-alt-media img { object-fit: contain; mix-blend-mode: multiply; padding: 12px; box-sizing: border-box; }

.tg-entity-lab { padding-top: 0; }
.tg-lab-state { background: var(--tg-crema); border: 0; border-radius: 20px; padding: 24px 28px; }
.tg-lab-state h3 { font-size: 1.25rem; }
.tg-transparency { border-radius: 28px; }

/* Footer */
.tg-footer { background: var(--tg-espresso) !important; }
.tg-footer .wp-block-site-title, .tg-footer .wp-block-site-title a { font-family: var(--tg-font-display); font-weight: 800; letter-spacing: -0.03em; }
.tg-footer h3 { font-family: var(--tg-font-body); font-weight: 700; letter-spacing: 0; }
.tg-footer p { color: #D6D3D1; }

/* Small screens */
@media (max-width: 781px) {
  .tg-entity-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .tg-entity-media { aspect-ratio: 4 / 3; }
  .tg-block__head { align-items: flex-start; }
  .tg-home-hero__media img { border-radius: 20px; }
  .tg-pcards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
}

/* Machine catalog page (v0.5.0): products first, guide text after. */
.tg-hub-hero--catalog { padding-block: clamp(28px, 5vw, 48px) 8px; }
.tg-hub-hero--catalog .wp-block-post-title { margin: 0; }
.tg-hub-hero__sub { margin: 12px 0 0; max-width: 680px; color: var(--tg-ink-soft); font-size: 1.125rem; }
.tg-machine-hub__body { padding-block: 16px clamp(40px, 6vw, 72px); }
.tg-machine-hub__body .wp-block-post-content > * { max-width: none; }
.tg-machine-hub .tg-machine-hub-editorial-intro { max-width: 760px; margin: clamp(40px, 6vw, 64px) 0 0; padding-top: 32px; border-top: 1px solid var(--tg-line); }
.tg-machine-hub .tg-machine-hub-editorial-intro h2 { font-size: clamp(1.5rem, 2.6vw, 1.875rem); margin-top: 1.6em; }
.tg-machine-hub .tg-machine-hub-editorial-intro p { color: var(--tg-ink-soft); }
.tg-entity-hero + .tg-entity-section { padding-top: clamp(24px, 3vw, 36px); }

/* Core plugin catalogs (coffee, grinders): same type and colours as the rest. */
.tg-coffee-db-section h2, .tg-coffee-catalog__summary strong { font-family: var(--tg-font-display) !important; font-weight: 800; letter-spacing: -0.02em; }
.tg-coffee-card__title { font-family: var(--tg-font-body) !important; font-weight: 700; letter-spacing: 0; }
.tg-coffee-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; font-size: .875rem; color: var(--tg-ink-soft); }
.tg-coffee-breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--tg-line); }
.tg-coffee-breadcrumb a { color: var(--tg-ink-soft); }
.tg-entity-view p:empty { display: none; }

/* Editorial hubs (Guide, Confronti, Metodi) v0.5.0 */
.tg-editorial-hub__body { padding-block: 16px clamp(48px, 7vw, 80px); }
.tg-hub-jump { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 8px; }
.tg-hub-jump a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--tg-line); border-radius: 999px; background: #fff; color: var(--tg-espresso); font-weight: 600; font-size: .9375rem; text-decoration: none; }
.tg-hub-jump a:hover { border-color: var(--tg-espresso); }
.tg-hub-jump span { opacity: .6; font-weight: 500; }
.tg-hub-group { margin-top: clamp(36px, 5vw, 56px); scroll-margin-top: 96px; }
.tg-hub-group .tg-topics { margin-top: 20px; }
.tg-hub-card img { height: 170px; }
.tg-hub-card .tg-topic__body { flex: 1; }
.tg-hub-card__go { margin-top: auto; padding-top: 12px; color: var(--tg-rust); font-weight: 700; font-size: .9375rem; }
.tg-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 8px; }
.tg-method { display: flex; flex-direction: column; border: 1px solid var(--tg-line); border-radius: 24px; overflow: hidden; background: #fff; }
.tg-method > img { display: block; width: 100%; height: 220px; object-fit: cover; }
.tg-method__body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 24px; }
.tg-method__title { margin: 0; font-family: var(--tg-font-display); font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.02em; }
.tg-method__copy { margin: 0; color: var(--tg-ink-soft); }
.tg-method__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; margin: 0; }
.tg-method__facts div { padding: 10px 12px; border-radius: 14px; background: var(--tg-crema); }
.tg-method__facts dt { font-size: .75rem; font-weight: 700; color: var(--tg-ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.tg-method__facts dd { margin: 2px 0 0; font-weight: 700; font-size: .9375rem; }
.tg-method__more-title { margin: 6px 0 0; font-weight: 700; }
.tg-method__more { margin: 0; padding: 0; list-style: none; width: 100%; }
.tg-method__more li { border-top: 1px solid var(--tg-line); }
.tg-method__more a { display: block; padding: 10px 0; color: var(--tg-espresso); text-decoration: none; }
.tg-method__more a::after { content: " →"; color: var(--tg-rust); }
.tg-method__more a:hover { color: var(--tg-rust); }
.tg-methods-other { margin-top: clamp(40px, 6vw, 64px); }
.tg-methods-other__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }
.tg-methods-other__grid a { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 20px; background: var(--tg-sage-soft); color: var(--tg-espresso); text-decoration: none; }
.tg-methods-other__grid a strong { font-size: 1.125rem; }
.tg-methods-other__grid a span { color: var(--tg-ink-soft); }
.tg-methods-other__grid a:hover strong { color: var(--tg-sage); }
@media (max-width: 480px) { .tg-method__facts div { padding: 8px; } .tg-method__facts dd { font-size: .8125rem; } }
.tg-hub-card .tg-topic__title { font-size: 1.1875rem; line-height: 1.25; }
.tg-hub-group .tg-topics { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* v0.6.0 — machine page tabs + Opinioni */
.tg-tabs-bar { border-bottom: 1px solid var(--tg-line); background: var(--tg-paper); }
.tg-tabs-list { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tg-tabs-list::-webkit-scrollbar { display: none; }
.tg-tab { flex: 0 0 auto; appearance: none; background: none; border: 0; border-bottom: 3px solid transparent; padding: 16px 14px 13px; font: 650 1rem/1.2 var(--tg-font-body); color: var(--tg-ink-soft); cursor: pointer; white-space: nowrap; }
.tg-tab:hover { color: var(--tg-espresso); }
.tg-tab[aria-selected="true"] { color: var(--tg-espresso); border-bottom-color: var(--tg-rust); }
.tg-tab:focus-visible { outline: 2px solid var(--tg-rust); outline-offset: -2px; border-radius: 6px; }
.tg-tabs:not(.is-ready) .tg-tabs-bar { display: none; }
.tg-tab-panel[hidden] { display: none; }

.tg-op h2 { margin-bottom: 10px; }
.tg-op-verdict { font-size: clamp(1.05rem, 1.7vw, 1.25rem); line-height: 1.6; max-width: 760px; margin: 0 0 8px; }
.tg-op-basis { color: var(--tg-ink-soft); font-size: .9rem; margin: 0 0 28px; }
.tg-op-subtitle { font-family: var(--tg-font-display); font-size: 1.2rem; margin: 0 0 14px; }
.tg-op-bars { display: grid; gap: 12px; max-width: 760px; }
.tg-op-bar-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 210px; gap: 14px; align-items: center; }
.tg-op-bar-label { font-weight: 650; }
.tg-op-bar { display: flex; height: 12px; border-radius: 999px; background: #E9E4DC; overflow: hidden; }
.tg-op-bar-pos { background: var(--tg-sage); }
.tg-op-bar-neg { background: var(--tg-rust); }
.tg-op-bar-value { font-size: .85rem; color: var(--tg-ink-soft); text-align: left; font-variant-numeric: tabular-nums; }
.tg-op-bar-value strong { color: var(--tg-espresso); font-weight: 650; }
.tg-op-legend { font-size: .85rem; color: var(--tg-ink-soft); margin: 0 0 16px; max-width: 760px; }
.tg-op-bars { margin-bottom: 30px; }
.tg-op-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 5px 0 0; vertical-align: -1px; }
.tg-op-dot-neg { margin-left: 10px; background: var(--tg-rust); }
.tg-op-dot-pos { margin-left: 4px; }
.tg-op-dot-pos { background: var(--tg-sage); }
.tg-op-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tg-op-card { border: 1px solid var(--tg-line); border-radius: 18px; background: #fff; padding: 20px 22px; }
.tg-op-card h3 { margin: 0 0 10px; font-family: var(--tg-font-display); font-size: 1.2rem; }
.tg-op-card ul { margin: 0; padding-left: 1.15rem; }
.tg-op-card li + li { margin-top: .45rem; }
.tg-op-card-pos { border-left: 4px solid var(--tg-sage); }
.tg-op-card-neg { border-left: 4px solid var(--tg-rust); }
.tg-op-card-mixed { border-left: 4px solid #C9A227; }
.tg-op-card-fail { border-left: 4px solid var(--tg-espresso); }
.tg-op-when { display: inline-block; font-size: .78rem; color: var(--tg-ink-soft); background: var(--tg-crema); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.tg-op-method { margin-top: 26px; font-size: .9rem; color: var(--tg-ink-soft); max-width: 760px; }
.tg-op-method summary { cursor: pointer; font-weight: 650; color: var(--tg-espresso); }
.tg-op-sources { padding-left: 1.15rem; }
@media (max-width: 700px) {
  .tg-op-grid { grid-template-columns: 1fr; }
  .tg-op-bar-row { grid-template-columns: 1fr auto; gap: 6px 10px; }
  .tg-op-bar { grid-column: 1 / -1; grid-row: 2; }
  .tg-op-bar-value { text-align: right; }
  .tg-tab { padding: 14px 8px 11px; font-size: .9rem; }
  .tg-tabs-list { gap: 0; }
}
