/*
Theme Name: DEF Osservatorio
Theme URI: https://www.digitaleconomyforum.it/
Author: Digital Economy Forum
Author URI: https://www.digitaleconomyforum.it/
Description: Osservatorio dell'economia digitale italiana — research-institute editorial theme for digitaleconomyforum.it
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: def-osservatorio
Tags: custom-menu, featured-images, translation-ready
*/

/* ============ Metric-matched fallback fonts (CLS) ============
   The webfonts come from bunny.net with font-display:swap, so between first
   paint and the font arriving the page renders in a fallback. If that fallback
   occupies different space, the swap reflows the whole page — measured at up to
   0.62 CLS on /casino/ against a 0.10 limit, and an isolation run (fonts blocked
   => CLS 0.0000 on 5/5 runs) proved the fonts were the ENTIRE remaining cause
   once the operator-logo sizing was fixed.

   These faces re-declare a local font with overridden metrics so it occupies the
   SAME space as the webfont, which makes the swap non-reflowing while still
   letting the branded fonts always render (unlike font-display:optional, which
   would sometimes not show them at all).

   Liberation Sans/Mono are metric-compatible with Arial/Courier New by design,
   so they were used as the measurement reference for fonts we can't install here.

   Values are GENERATED, not hand-tuned — regenerate with
   scratchpad/font_overrides.py if a family or weight changes. size-adjust comes
   from real per-string advance-width sums (hmtx via cmap), NOT from OS/2
   xAvgCharWidth: that field is computed inconsistently between foundries and
   yielded an implausible 133% for Schibsted Grotesk vs Arial.
   Sanity check that the method is sound: IBM Plex Mono vs Courier New measures a
   0.00pp spread across all sample strings, as a uniform-advance font must. */
@font-face {
  font-family: 'Schibsted Grotesk Fallback';
  src: local('Arial');
  size-adjust: 103.64%;
  ascent-override: 94.22%;
  descent-override: 24.88%;
  line-gap-override: 0.00%;
}
@font-face {
  font-family: 'Libre Franklin Fallback';
  src: local('Arial');
  size-adjust: 103.85%;
  ascent-override: 93.02%;
  descent-override: 23.69%;
  line-gap-override: 0.00%;
}
@font-face {
  font-family: 'IBM Plex Mono Fallback';
  src: local('Courier New');
  size-adjust: 99.98%;
  ascent-override: 102.52%;
  descent-override: 27.50%;
  line-gap-override: 0.00%;
}

/* ============ Tokens ============ */
:root {
  --dfo-cobalt: #0047AB;
  --dfo-cobalt-deep: #003682;
  --dfo-ink: #0F172A;
  --dfo-ink-soft: #475569;
  --dfo-mute: #94A3B8;
  --dfo-faint: #CBD5E1;
  --dfo-hairline: #E2E8F0;
  --dfo-hairline-lt: #F1F5F9;
  --dfo-paper: #FFFFFF;
  --dfo-panel: #F8FAFC;
  --dfo-up: #059669;
  --dfo-down: #DC2626;
  /* The '… Fallback' entries must sit immediately after their webfont — that is
     what makes the font-display:swap handover non-reflowing. See the @font-face
     block above before reordering or removing them. */
  --dfo-font-display: 'Schibsted Grotesk', 'Schibsted Grotesk Fallback', system-ui, sans-serif;
  --dfo-font-body: 'Libre Franklin', 'Libre Franklin Fallback', system-ui, sans-serif;
  --dfo-font-data: 'IBM Plex Mono', 'IBM Plex Mono Fallback', ui-monospace, monospace;
  --dfo-max: 1440px;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--dfo-font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--dfo-ink);
  background: var(--dfo-paper);
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--dfo-cobalt); text-decoration: none; }
h1, h2, h3, h4, h5 {
  font-family: var(--dfo-font-display);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--dfo-ink);
  margin: 0 0 0.6em;
}
.dfo-wrap { max-width: var(--dfo-max); margin: 0 auto; padding: 0 40px; }
@media (max-width: 760px) { .dfo-wrap { padding: 0 20px; } }

.dfo-data { font-family: var(--dfo-font-data); font-variant-numeric: tabular-nums; }
.dfo-kicker {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.28em; color: var(--dfo-mute);
  display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
}
.dfo-kicker::after { content: ""; height: 1px; flex: 1; background: var(--dfo-hairline-lt); }
.dfo-up { color: var(--dfo-up); }
.dfo-down { color: var(--dfo-down); }

/* rule-extend link treatment (signature: links grow a hairline that thickens to cobalt) */
.dfo-rl { position: relative; color: inherit; }
.dfo-rl::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 24%;
  background: var(--dfo-faint); transition: width .28s cubic-bezier(.4,0,.2,1), background-color .28s, height .18s;
}
.dfo-rl:hover::after, .dfo-rl:focus-visible::after { width: 100%; background: var(--dfo-cobalt); height: 2px; }

/* ============ Header ============ */
.dfo-header {
  background: var(--dfo-paper);
  border-bottom: 1px solid var(--dfo-hairline);
  position: sticky; top: 0; z-index: 60;
}
.dfo-header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 92px; }
.dfo-brand { display: flex; align-items: center; gap: 16px; color: var(--dfo-ink); }
.dfo-brand-mark { flex-shrink: 0; }
.dfo-brand-name {
  font-family: var(--dfo-font-display); font-weight: 900; font-size: 22px;
  letter-spacing: -0.04em; text-transform: uppercase; line-height: 1; display: block;
}
.dfo-brand-tag {
  display: block; font-size: 9px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--dfo-cobalt); margin-top: 5px;
}
.dfo-nav { display: flex; align-items: center; gap: 34px; }
.dfo-nav ul { display: flex; gap: 34px; list-style: none; margin: 0; padding: 0; }
.dfo-nav a {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--dfo-ink-soft); transition: color .2s; white-space: nowrap;
}
.dfo-nav a:hover { color: var(--dfo-cobalt); }
.dfo-clock { text-align: right; }
.dfo-clock-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dfo-mute); }
.dfo-clock-time { font-size: 12px; font-weight: 700; }
.dfo-clock-time .dfo-tz { color: var(--dfo-cobalt); }
.dfo-burger {
  display: none; background: none; border: 1px solid var(--dfo-hairline); width: 40px; height: 40px;
  cursor: pointer; align-items: center; justify-content: center; padding: 0;
}
.dfo-burger svg { width: 18px; height: 18px; stroke: var(--dfo-ink-soft); }
/* The full 7-item primary nav at its spacious desktop sizing (gap 34px, font 11px,
   letter-spacing 0.14em) needs ~1400px to fit on one line without wrapping mid-word —
   below that it was either hidden (burger, old 1080px breakpoint) or shown-but-broken
   (1081-1439px dead zone, common laptop widths like 1280x800/1366x768). Fix: a compact
   nav sizing tier for 1080-1439px (measured to fit cleanly with margin to spare down to
   1080px) keeps the inline nav visible through that whole range instead of falling back
   to the burger menu; only <1080px still collapses to the burger/dropdown. */
@media (min-width: 1080px) and (max-width: 1439px) {
  .dfo-nav ul { gap: 16px; }
  .dfo-nav a { font-size: 10px; letter-spacing: 0.08em; }
}
@media (max-width: 1079px) {
  .dfo-nav { display: none; }
  .dfo-nav.dfo-open {
    display: block; position: absolute; top: 92px; left: 0; right: 0;
    background: var(--dfo-paper); border-bottom: 1px solid var(--dfo-hairline); padding: 18px 20px 26px;
  }
  .dfo-nav.dfo-open ul { flex-direction: column; gap: 18px; }
  .dfo-burger { display: flex; }
  .dfo-clock { display: none; }
  .dfo-brand-name { font-size: 17px; }
}

/* ============ Ticker ============ */
.dfo-ticker {
  border-bottom: 1px solid var(--dfo-hairline);
  overflow: hidden; padding: 7px 0; background: var(--dfo-paper);
}
.dfo-ticker-track { display: flex; white-space: nowrap; will-change: transform; }
.dfo-ticker-set { display: flex; gap: 48px; align-items: center; padding: 0 40px; flex-shrink: 0; }
.dfo-ticker-set > span, .dfo-ticker-item { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; }
.dfo-ticker-item { display: inline-flex; gap: 10px; align-items: center; }
.dfo-ticker-item .dfo-t-label { color: var(--dfo-mute); }
.dfo-live { display: inline-flex; align-items: center; gap: 7px; color: var(--dfo-down); font-weight: 900; }
.dfo-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dfo-down); animation: dfo-pulse 1.6s ease-out infinite; }
@keyframes dfo-pulse { 0% { box-shadow: 0 0 0 0 rgba(220,38,38,.5); } 70% { box-shadow: 0 0 0 7px rgba(220,38,38,0); } 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); } }
.dfo-tri { width: 0; height: 0; display: inline-block; }
.dfo-tri-up { border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 6px solid var(--dfo-up); }
.dfo-tri-down { border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 6px solid var(--dfo-down); }
@media (prefers-reduced-motion: reduce) {
  .dfo-ticker-track { animation: none !important; transform: none !important; flex-wrap: wrap; white-space: normal; }
  .dfo-live-dot { animation: none; }
}

/* ============ Layout shell ============ */
.dfo-shell { border-left: 1px solid var(--dfo-hairline); border-right: 1px solid var(--dfo-hairline); max-width: var(--dfo-max); margin: 0 auto; }
.dfo-cols { display: flex; align-items: stretch; }
.dfo-main { width: 74%; padding: 56px 48px; border-right: 1px solid var(--dfo-hairline); min-width: 0; }
.dfo-side { width: 26%; padding: 48px 36px; min-width: 0; }
@media (max-width: 1080px) {
  .dfo-cols { flex-direction: column; }
  .dfo-main, .dfo-side { width: 100%; border-right: none; padding: 36px 20px; }
  .dfo-side { border-top: 1px solid var(--dfo-hairline); }
}

/* ============ Front page — lead report ============ */
.dfo-lead-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.dfo-badge {
  color: var(--dfo-cobalt); border: 1px solid var(--dfo-cobalt);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.2em; padding: 3px 9px;
}
.dfo-lead-date { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--dfo-mute); }
.dfo-lead-title {
  font-size: clamp(34px, 4.6vw, 58px); font-weight: 900; text-transform: uppercase;
  letter-spacing: -0.035em; line-height: 0.98; max-width: 21ch; margin-bottom: 26px;
}
.dfo-lead-title a { color: inherit; }
.dfo-lead-title a:hover { color: var(--dfo-cobalt); }
.dfo-lead-standfirst { font-size: 19px; font-weight: 500; color: var(--dfo-ink-soft); line-height: 1.55; max-width: 62ch; margin: 0 0 40px; }
.dfo-lead-facts { display: flex; align-items: center; gap: 44px; border-top: 1px solid var(--dfo-hairline-lt); border-bottom: 1px solid var(--dfo-hairline-lt); padding: 22px 0; flex-wrap: wrap; }
.dfo-fact-label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--dfo-mute); letter-spacing: 0.06em; }
.dfo-fact-value { font-size: 14px; font-weight: 700; }
.dfo-fact-value.dfo-accent { color: var(--dfo-cobalt); }
.dfo-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--dfo-cobalt); color: #fff; border: none; cursor: pointer;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em;
  padding: 13px 26px; transition: background-color .2s;
}
.dfo-btn:hover { background: var(--dfo-cobalt-deep); color: #fff; }
.dfo-btn-right { margin-left: auto; }

/* ============ Indicator rows (article listing w/ bars) ============ */
.dfo-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 64px; }
@media (max-width: 860px) { .dfo-grid-2 { grid-template-columns: minmax(0,1fr); } }
.dfo-ind { margin-bottom: 44px; }
.dfo-ind-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.dfo-ind-head h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.dfo-ind-head h3 a { color: inherit; }
.dfo-ind-head h3 a:hover { color: var(--dfo-cobalt); }
.dfo-ind-delta { font-size: 12px; font-weight: 700; white-space: nowrap; }
.dfo-bar { height: 4px; background: var(--dfo-hairline-lt); margin-bottom: 10px; }
.dfo-bar-fill { height: 100%; background: var(--dfo-cobalt); width: 0; transition: width 1s cubic-bezier(.22,1,.36,1); }
.dfo-ind-foot { display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--dfo-mute); }

/* ============ Method / info panel ============ */
.dfo-panel { border: 1px solid var(--dfo-hairline-lt); padding: 30px; }
.dfo-panel-item { margin-bottom: 22px; }
.dfo-panel-item:last-child { margin-bottom: 0; }
.dfo-panel-label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--dfo-mute); margin-bottom: 6px; }
.dfo-panel-item p { font-size: 13px; line-height: 1.6; font-weight: 500; margin: 0; }

/* ============ Sidebar — briefing ============ */
.dfo-side-sticky { position: sticky; top: 130px; }
.dfo-side-title { font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.28em; margin-bottom: 30px; }
.dfo-brief { padding-bottom: 22px; border-bottom: 1px solid var(--dfo-hairline-lt); margin-bottom: 24px; }
.dfo-brief-time { font-size: 10px; font-weight: 700; color: var(--dfo-cobalt); }
.dfo-brief h3 { font-size: 14px; font-weight: 700; margin: 8px 0 6px; line-height: 1.35; }
.dfo-brief h3 a { color: inherit; }
.dfo-brief h3 a:hover { color: var(--dfo-cobalt); }
.dfo-brief p { font-size: 11px; color: var(--dfo-mute); margin: 0; }
.dfo-side-panel { background: var(--dfo-panel); border: 1px solid var(--dfo-hairline-lt); padding: 28px; margin-top: 46px; }
.dfo-side-panel h3 { font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.28em; margin-bottom: 18px; }
.dfo-quote { margin-bottom: 22px; }
.dfo-quote:last-child { margin-bottom: 0; }
.dfo-quote-name { font-size: 10px; font-weight: 700; color: var(--dfo-mute); display: block; margin-bottom: 5px; }
.dfo-quote p { font-size: 13px; font-weight: 700; font-style: italic; line-height: 1.5; margin: 0; }

/* ============ Section blocks (front-page pillars) ============ */
.dfo-section { margin-top: 72px; }
.dfo-teaser-list { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 48px; }
@media (max-width: 860px) { .dfo-teaser-list { grid-template-columns: minmax(0,1fr); } }
.dfo-teaser { border-top: 1px solid var(--dfo-hairline-lt); padding-top: 18px; }
.dfo-teaser-meta { display: flex; gap: 14px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--dfo-mute); margin-bottom: 8px; }
.dfo-teaser-meta .dfo-teaser-cat { color: var(--dfo-cobalt); }
.dfo-teaser h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; line-height: 1.3; }
.dfo-teaser h3 a { color: inherit; }
.dfo-teaser h3 a:hover { color: var(--dfo-cobalt); }
.dfo-teaser p { font-size: 13px; color: var(--dfo-ink-soft); margin: 0; }

/* ============ Article (single) ============ */
.dfo-article { max-width: 760px; }
.dfo-article-title { font-size: clamp(28px, 3.6vw, 44px); font-weight: 900; text-transform: uppercase; letter-spacing: -0.03em; line-height: 1.02; }
.dfo-article-meta { display: flex; gap: 18px; align-items: center; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--dfo-mute); margin: 20px 0 34px; flex-wrap: wrap; }
.dfo-content { font-size: 16.5px; line-height: 1.75; }
.dfo-content > * + * { margin-top: 1.15em; }
.dfo-content h2 { font-size: 25px; margin-top: 2em; letter-spacing: -0.015em; }
.dfo-content h3 { font-size: 19px; margin-top: 1.7em; }
.dfo-content a { border-bottom: 1px solid var(--dfo-faint); transition: border-color .2s; }
.dfo-content a:hover { border-color: var(--dfo-cobalt); }
.dfo-content blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 26px; border-left: 2px solid var(--dfo-cobalt);
  font-weight: 600; font-style: italic; color: var(--dfo-ink-soft);
}
.dfo-content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dfo-content .dfo-table-scroll { overflow-x: auto; }
.dfo-content th {
  text-align: left; font-family: var(--dfo-font-display); font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--dfo-mute);
  border-bottom: 2px solid var(--dfo-ink); padding: 10px 14px;
}
.dfo-content td { border-bottom: 1px solid var(--dfo-hairline-lt); padding: 11px 14px; }
.dfo-content td.dfo-num, .dfo-content th.dfo-num { font-family: var(--dfo-font-data); font-variant-numeric: tabular-nums; text-align: right; }
.dfo-content figure { margin: 1.8em 0; }
.dfo-content figcaption { font-size: 12px; color: var(--dfo-mute); margin-top: 8px; }

/* FAQ accordion — H3 questions inside summary (house rule) */
.dfo-faq details { border-top: 1px solid var(--dfo-hairline-lt); }
.dfo-faq details:last-child { border-bottom: 1px solid var(--dfo-hairline-lt); }
.dfo-faq summary { cursor: pointer; padding: 16px 4px; display: flex; align-items: center; justify-content: space-between; gap: 16px; list-style: none; }
.dfo-faq summary::-webkit-details-marker { display: none; }
.dfo-faq summary h3 { font-size: 15.5px; font-weight: 700; margin: 0; line-height: 1.4; }
.dfo-faq summary::after { content: "+"; font-family: var(--dfo-font-data); font-size: 18px; color: var(--dfo-cobalt); flex-shrink: 0; }
.dfo-faq details[open] summary::after { content: "\2212"; }
.dfo-faq .dfo-faq-a { padding: 0 4px 20px; font-size: 14.5px; color: var(--dfo-ink-soft); }

/* ============ Archive / listing ============ */
.dfo-list-item { border-top: 1px solid var(--dfo-hairline-lt); padding: 26px 0; }
.dfo-list-item h2 { font-size: 21px; margin: 6px 0 8px; }
.dfo-list-item h2 a { color: inherit; }
.dfo-list-item h2 a:hover { color: var(--dfo-cobalt); }
.dfo-list-item p { font-size: 14px; color: var(--dfo-ink-soft); margin: 0; }
.dfo-pagination { display: flex; gap: 10px; margin-top: 40px; font-family: var(--dfo-font-data); font-size: 13px; }
.dfo-pagination .page-numbers { border: 1px solid var(--dfo-hairline); padding: 7px 13px; color: var(--dfo-ink-soft); }
.dfo-pagination .page-numbers.current { background: var(--dfo-ink); color: #fff; border-color: var(--dfo-ink); }

/* ============ Money pages (casino / scommesse) ============ */
.dfo-disclosure {
  background: var(--dfo-panel); border-bottom: 1px solid var(--dfo-hairline);
  font-size: 10.5px; line-height: 1.55; color: var(--dfo-ink-soft); padding: 10px 0;
}
.dfo-op-table { border: 1px solid var(--dfo-hairline); }
.dfo-op-row { display: flex; align-items: center; gap: 26px; padding: 22px 26px; border-bottom: 1px solid var(--dfo-hairline-lt); flex-wrap: wrap; }
.dfo-op-row:last-child { border-bottom: none; }
.dfo-op-rank { font-family: var(--dfo-font-data); font-size: 13px; font-weight: 700; color: var(--dfo-mute); width: 34px; }
/* Fixed height, NOT min-height: this makes the logo cell a rigid box (border-box, so
   54px includes the 10px padding => 34px of content), which means nothing the <img>
   inside does can change the cell's outer size. Combined with the max-width/max-height
   rule below, the logo can never shift the row — that was 0.30 of the 0.62 CLS. */
.dfo-op-logo { width: 118px; height: 54px; flex-shrink: 0; background: #fff; border: 1px solid var(--dfo-hairline-lt); padding: 10px 14px; display: flex; align-items: center; justify-content: center; }
/* max-width keeps the widest logo (sisal.png, 380x125 → 103px at 34px tall) inside the
   90px content box; without it the img overflowed and, because .dfo-op-row is
   flex-wrap:wrap, the row re-wrapped as the logos arrived. Paired with the explicit
   width+height attrs from dfo_op_logo_markup() (see dfo_op_logo_dimensions) the browser
   knows the aspect ratio up front and reserves the box before the file arrives. */
.dfo-op-logo img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.dfo-op-body { flex: 1; min-width: 220px; }
.dfo-op-name { font-family: var(--dfo-font-display); font-size: 17px; font-weight: 800; }
.dfo-op-licence { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dfo-mute); margin-top: 3px; }
.dfo-op-features { font-size: 12.5px; color: var(--dfo-ink-soft); margin-top: 8px; }
.dfo-op-review-link { margin-top: 8px; }
.dfo-op-review-link a { font-size: 12.5px; font-weight: 700; color: var(--dfo-cobalt); border-bottom: none; }
.dfo-op-review-link a:hover { color: var(--dfo-cobalt-deep); }
/* 84px, not 76px: "PUNTEGGIO" is 9 chars of IBM Plex Mono at 9px + tracking and needs
   ~57px, which did not fit the old 56px content box — it wrapped to "PUNTEGGI" + a bare
   "O" on the next line, which reads as a score of 0. nowrap on the label makes that
   impossible at any breakpoint even if the box gets tighter later. */
.dfo-op-score { font-family: var(--dfo-font-data); text-align: center; padding: 0 10px; width: 84px; flex-shrink: 0; }
.dfo-op-score-val { font-size: 22px; font-weight: 700; color: var(--dfo-cobalt); display: block; }
.dfo-op-score-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dfo-mute); white-space: nowrap; display: block; }
/* Fixed width — button text length varies a lot per operator name ("Vai a Snai" vs
   "Vai a PlanetWin365"); without a fixed width, .dfo-op-body's flex:1 absorbs the
   difference and shifts the whole score+CTA column left/right per row. */
.dfo-op-cta { flex-shrink: 0; width: 190px; }
.dfo-op-cta .dfo-btn { width: 100%; justify-content: center; }
.dfo-op-rg { width: 100%; font-size: 9.5px; color: var(--dfo-mute); margin: 6px 0 0; }
@media (max-width: 760px) { .dfo-op-row { gap: 14px; } .dfo-op-cta { width: 100%; } .dfo-op-cta .dfo-btn { width: 100%; justify-content: center; } }

/* ============ Footer ============ */
.dfo-footer { border-top: 1px solid var(--dfo-hairline); padding: 72px 0 0; margin-top: 88px; }
.dfo-footer-cols { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.dfo-footer-brand { max-width: 320px; }
.dfo-footer-brand p { font-size: 12px; font-weight: 500; color: var(--dfo-mute); line-height: 1.6; }
.dfo-footer h2 { font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.28em; margin-bottom: 18px; }
.dfo-footer-nav ul { list-style: none; margin: 0; padding: 0; }
.dfo-footer-nav li { margin-bottom: 10px; }
.dfo-footer-nav a { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--dfo-mute); }
.dfo-footer-nav a:hover { color: var(--dfo-cobalt); }
.dfo-compliance {
  margin-top: 56px; border-top: 1px solid var(--dfo-hairline-lt); padding: 30px 0;
  font-size: 10.5px; line-height: 1.6; color: var(--dfo-mute);
}
.dfo-compliance p { margin: 0 0 10px; max-width: 1080px; }
.dfo-compliance-badges { display: flex; align-items: center; gap: 18px; margin: 18px 0 6px; flex-wrap: wrap; }
.dfo-badge-18 {
  width: 40px; height: 40px; border-radius: 50%; background: var(--dfo-ink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--dfo-font-display); font-size: 12px; font-weight: 900; flex-shrink: 0;
}
.dfo-compliance-badges a { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dfo-ink-soft); border: 1px solid var(--dfo-hairline); padding: 9px 14px; }
.dfo-compliance-badges a:hover { border-color: var(--dfo-cobalt); color: var(--dfo-cobalt); }
.dfo-rg-line { font-weight: 700; color: var(--dfo-ink-soft); }
.dfo-footer-base {
  border-top: 1px solid var(--dfo-hairline-lt); padding: 22px 0; margin-top: 8px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.2em; color: var(--dfo-faint);
}
.dfo-footer-base a { color: var(--dfo-mute); }
.dfo-footer-base a:hover { color: var(--dfo-cobalt); }

/* ============ Reveal / decode ============ */
.dfo-decode { display: inline-block; min-width: 1ch; }

/* ============ Misc ============ */
.dfo-search-form { display: flex; gap: 0; max-width: 420px; }
.dfo-search-form input {
  flex: 1; background: var(--dfo-panel); border: 1px solid var(--dfo-hairline);
  font-family: var(--dfo-font-body); font-size: 13px; padding: 11px 14px; min-width: 0;
}
.dfo-search-form input:focus { outline: none; border-color: var(--dfo-cobalt); }
.dfo-search-form button { background: var(--dfo-ink); color: #fff; border: none; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; padding: 0 22px; cursor: pointer; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

/* ============ Money — operator components (Phase 2) ============ */
/* Fallback when a logo file is missing — never a broken <img>. */
.dfo-op-name-text {
  font-family: var(--dfo-font-display); font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.02em; color: var(--dfo-ink-soft);
  text-align: center; line-height: 1.2;
}

/* Single-operator review card ([dfo_op_scheda]) — built on .dfo-panel. */
.dfo-op-scheda-head { display: flex; align-items: center; gap: 22px; margin-bottom: 26px; flex-wrap: wrap; }
.dfo-op-scheda-head-body { flex: 1; min-width: 160px; }
.dfo-op-scheda-head-action { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.dfo-op-scheda-head-action .dfo-op-score { width: auto; padding: 0; }
.dfo-op-scheda-head-action .dfo-op-cta { min-width: 160px; }
.dfo-op-scheda-head-action .dfo-op-cta .dfo-btn { width: 100%; justify-content: center; }
.dfo-op-scheda-body { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 32px; align-items: start; }
.dfo-op-scheda-body .dfo-panel-item { margin-bottom: 0; padding: 18px 20px; background: var(--dfo-panel); border: 1px solid var(--dfo-hairline-lt); }
.dfo-op-scheda-features { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.7; color: var(--dfo-ink-soft); }
.dfo-op-scheda .dfo-panel-label { display: flex; align-items: center; gap: 7px; }
.dfo-panel-icon { flex-shrink: 0; }
.dfo-op-scheda .dfo-op-rg { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--dfo-hairline-lt); }
@media (max-width: 640px) {
  /* Stack score above CTA (not side-by-side): the generic ".dfo-op-cta { width:100% }"
     rule from the comparison-table breakpoint above also matches this CTA (same class,
     no ancestor scoping there), so side-by-side it fights the score box for width and
     the button overflows past the card/viewport. Stacking removes the competition. */
  .dfo-op-scheda-head-action { width: 100%; flex-direction: column; align-items: stretch; gap: 12px; }
  .dfo-op-scheda-head-action .dfo-op-score { text-align: left; }
  .dfo-op-scheda-body { grid-template-columns: 1fr; }
}

/* ============ Money template — full-width main (page-money.php) ============ */
.dfo-main-full { width: 100%; border-right: none; }

/* ============ Money template — "In questa sezione" strip (page-money.php) ============ */
.dfo-money-section-nav {
  margin-top: 64px; border-top: 1px solid var(--dfo-hairline); padding-top: 32px;
}
.dfo-money-section-nav .dfo-side-title { margin-bottom: 22px; }
.dfo-money-section-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 28px;
  list-style: none; margin: 0; padding: 0;
}
.dfo-money-section-list li { border-top: 1px solid var(--dfo-hairline-lt); padding-top: 12px; }
.dfo-money-section-list a { font-size: 13px; font-weight: 700; color: var(--dfo-ink); }
.dfo-money-section-list a:hover { color: var(--dfo-cobalt); }

/* ============ Home masthead (cornerstone H1) ============ */
.dfo-home-masthead { border-bottom: 1px solid var(--dfo-hairline-lt); padding-bottom: 34px; margin-bottom: 44px; }
.dfo-home-h1 {
  font-size: clamp(20px, 2.1vw, 27px); font-weight: 800; letter-spacing: -0.015em;
  line-height: 1.25; max-width: 32ch; margin-bottom: 12px;
}
.dfo-home-standfirst { font-size: 14.5px; color: var(--dfo-ink-soft); max-width: 74ch; margin: 0; }

/* ============ Cookie / consent banner (inc/consent.php) ============ */
.dfo-consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
  background: var(--dfo-ink); color: #fff;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 18px max(20px, env(safe-area-inset-left)) max(18px, env(safe-area-inset-bottom));
  animation: dfo-consent-in .32s ease-out;
}
.dfo-consent[hidden] { display: none; }
.dfo-consent-inner {
  max-width: var(--dfo-max); margin: 0 auto;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.dfo-consent-text {
  flex: 1 1 320px; min-width: 0; margin: 0;
  font-size: 13px; line-height: 1.6; color: rgba(255,255,255,0.88);
}
.dfo-consent-link { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.dfo-consent-link:hover, .dfo-consent-link:focus-visible { color: var(--dfo-faint); }
.dfo-consent-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; flex-wrap: wrap; }
.dfo-consent-btn {
  font-family: var(--dfo-font-body); font-size: 12px; font-weight: 700;
  border-radius: 2px; white-space: nowrap;
}
.dfo-consent-btn-ghost {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.35);
  padding: 12px 20px; cursor: pointer; text-transform: none; letter-spacing: normal;
  transition: border-color .2s, background-color .2s;
}
.dfo-consent-btn-ghost:hover, .dfo-consent-btn-ghost:focus-visible { border-color: #fff; background: rgba(255,255,255,0.06); }
.dfo-consent-actions .dfo-btn:focus-visible,
.dfo-consent-btn-ghost:focus-visible { outline: 2px solid var(--dfo-cobalt); outline-offset: 2px; }
@keyframes dfo-consent-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .dfo-consent { animation: none; }
}
@media (max-width: 640px) {
  .dfo-consent-inner { flex-direction: column; align-items: stretch; gap: 14px; }
  /* In column direction the desktop flex-basis (320px) would apply to the
     vertical axis and stretch the text block to 320px tall — reset it. */
  .dfo-consent-text { flex: 0 1 auto; }
  .dfo-consent-actions { justify-content: stretch; }
  .dfo-consent-actions .dfo-consent-btn { flex: 1 1 0; justify-content: center; }
}

/* ============ Layout-audit fixes 2026-07-23 ============ */
/* Money pages: reading measure on typographic content, full-bleed on the
   operator table + section nav. A child's own max-width can't exceed its
   parent's box, so the previous "cap the wrapper, then max-width:none the
   table" approach left a permanent blank column on wide viewports — the
   wrapper itself must go unconstrained and the measure applied per-child. */
.dfo-main-full .dfo-article { max-width: none; }
.dfo-main-full .dfo-content { max-width: none; }
.dfo-main-full .dfo-content > * { max-width: 860px; margin-left: auto; margin-right: auto; }
.dfo-main-full .dfo-content > .dfo-op-table { max-width: 100%; width: 100%; margin-left: 0; margin-right: 0; }
.dfo-main-full .dfo-money-section-nav { max-width: 100%; width: 100%; }

/* Review-page badge (page-money.php, single-operator pages only) — a small
   neutral accent, not a hero image, so it never reads as a banner next to
   the affiliate CTA (IT compliance: no banners on money pages). */
.dfo-review-badge {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 18px; padding: 8px 14px 8px 10px;
  border: 1px solid var(--dfo-hairline); border-radius: 2px;
}
.dfo-review-badge span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dfo-ink-soft); }
.dfo-money-section-nav { margin-top: 64px; }
.dfo-teaser-list-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 1080px) { .dfo-teaser-list-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 700px) { .dfo-teaser-list-3 { grid-template-columns: minmax(0,1fr); } }
/* Hub template */
.dfo-hub-intro { max-width: 720px; font-size: 17px; }
.dfo-ind-excerpt { font-size: 13.5px; color: var(--dfo-ink-soft); margin: 0 0 12px; max-width: 68ch; }
