/* ==========================================================================
   rating.css - brand rating block, cagliaricalcio.it
   Layout "spina": a vertical purple spine carries the rank down the left edge,
   the logo sits on a dark tile that overhangs the spine, and the figures are
   set as dotted leader lines - label, dots, value - the way a menu is set.
   The score and the button live in a column fenced off by a dashed rule.

   One brand per row, never two side by side.

   The file is deliberately outside the theme bundle and is linked with
   ?v=filemtime, so an edit shows up at once.

   Palette taken from the live site: violet #8E24CF, deep violet #5B117F,
   the dark tile behind the brand logos.
   ========================================================================== */

.cc-grid{
  --cc-p:#8E24CF;
  --cc-p2:#B14DF0;
  --cc-dk:#5B117F;
  --cc-tile:#15101a;
  --cc-ink:#2a1230;
  --cc-mut:#8b7d93;
  --cc-line:#e7dff0;
  --cc-dot:#d9cde6;
  --cc-soft:#faf6fe;

  /* one brand under another - a plain vertical list, never two in a row */
  display:flex;
  flex-direction:column;
  gap:18px;
  margin:14px 0 28px;
  text-align:left;
  font-family:Inter,system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
  font-size:14px;
  line-height:1.5;
  color:var(--cc-ink);
  -webkit-text-size-adjust:100%;
          text-size-adjust:100%;
}

/* ---------- theme typography reset ---------- */
.cc-grid p,.cc-grid ul,.cc-grid ol,.cc-grid li,
.cc-grid dl,.cc-grid dt,.cc-grid dd,
.cc-grid div,.cc-grid span,.cc-grid a,.cc-grid u,.cc-grid s,.cc-grid b,
.cc-grid em,.cc-grid i,.cc-grid strong,.cc-grid code,.cc-grid h3{
  font-size:inherit;line-height:inherit;margin:0;padding:0;color:inherit;
}
.cc-grid a{text-decoration:none}
.cc-grid u,.cc-grid s{text-decoration:none}
.cc-grid *{box-sizing:border-box}

body .cc-grid ul,body .cc-grid ol{
  list-style:none !important;list-style-type:none !important;padding-left:0 !important;margin:0 !important;
}
body .cc-grid ul li,body .cc-grid ol li{
  display:inline-flex !important;list-style:none !important;list-style-type:none !important;margin-bottom:0 !important;
}
body .cc-grid ul li::marker,body .cc-grid ol li::marker{content:'' !important}

/* ==========================================================================
   Card
   ========================================================================== */
.cc-grid .cc-card{
  position:relative;
  display:grid;
  grid-template-columns:58px 1fr 210px;
  /* the logo tile overhangs the spine, so the card is pushed in by its reach */
  margin-left:36px;
  background:#fff;
  border-radius:0 18px 18px 0;
  box-shadow:0 8px 24px -12px rgba(42,18,48,.45);
  transition:box-shadow .24s ease,transform .24s ease;
}
.cc-grid .cc-card:hover{transform:translateY(-2px);box-shadow:0 16px 34px -14px rgba(42,18,48,.55)}

/* ---------- spine: the rank runs down it, the logo overhangs ---------- */
.cc-grid .cc-spine{
  position:relative;
  background:linear-gradient(180deg,var(--cc-p2),var(--cc-dk));
  /* the rank sits at the top of the spine so the overhanging logo, which is
     centred on it, never covers the number */
  display:flex;align-items:flex-start;justify-content:center;padding-top:15px;
}
.cc-grid .cc-spine>b{
  writing-mode:vertical-rl;transform:rotate(180deg);
  font-family:'Barlow Condensed','Arial Narrow',system-ui,sans-serif;
  font-size:24px;font-weight:800;letter-spacing:.22em;color:#fff;line-height:1;
}
.cc-grid .cc-lg{
  position:absolute;left:-34px;top:50%;transform:translateY(-50%);
  width:92px;height:92px;border-radius:20px;background:var(--cc-tile);
  display:flex;align-items:center;justify-content:center;padding:9px;
  border:3px solid #fff;box-shadow:0 10px 24px -8px rgba(42,18,48,.75);
}
.cc-grid .cc-lg a{display:flex;align-items:center;justify-content:center;width:100%;height:100%}
.cc-grid .cc-lg img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;display:block}
.cc-grid .cc-lg__txt{font-size:12px;font-weight:800;color:#fff;text-align:center;line-height:1.2}

/* ---------- body ---------- */
.cc-grid .cc-bd{padding:18px 22px 16px 78px;min-width:0}

.cc-grid .cc-nm{
  font-family:'Barlow Condensed','Arial Narrow',system-ui,sans-serif;
  font-size:27px;font-weight:800;letter-spacing:.02em;text-transform:uppercase;line-height:1;
}
.cc-grid .cc-nm a{color:inherit}
.cc-grid .cc-nm a:hover{color:var(--cc-p)}
.cc-grid .cc-nm i{
  font-family:Inter,system-ui,sans-serif;font-style:normal;font-size:9.5px;font-weight:900;
  letter-spacing:.14em;text-transform:uppercase;padding:4px 10px;border-radius:4px;
  margin-left:9px;vertical-align:middle;
}
.cc-grid .cc-b1{background:var(--cc-p);color:#fff}
.cc-grid .cc-b2{border:1px solid var(--cc-line);color:var(--cc-mut)}

.cc-grid .cc-of{margin-top:7px;font-size:18px;font-weight:700;line-height:1.35;color:var(--cc-dk)}
.cc-grid .cc-of .bonus-main,.cc-grid .cc-of p{font-size:18px;font-weight:700;line-height:1.35;color:var(--cc-dk)}

.cc-grid .cc-special{margin-top:7px;font-size:13.5px;font-weight:600;line-height:1.45;color:var(--cc-p)}

.cc-grid .cc-fe{margin-top:9px;display:flex;flex-wrap:wrap;gap:6px}
.cc-grid .cc-fe li{
  font-size:12px;font-weight:700;color:var(--cc-dk);background:#f3e8fc;
  padding:5px 11px;border-radius:4px;
}

/* ---------- leader lines: label .......... value ---------- */
.cc-grid .cc-ld{margin-top:13px;display:grid;grid-template-columns:1fr 1fr;gap:3px 30px}
.cc-grid .cc-row{display:flex;align-items:baseline;gap:7px;font-size:12.5px;min-width:0}
.cc-grid .cc-row dt{display:flex;align-items:center;gap:6px;color:var(--cc-mut);white-space:nowrap}
.cc-grid .cc-row dt svg{width:14px;height:14px;flex:0 0 14px;color:var(--cc-p);transform:translateY(1px)}
.cc-grid .cc-row s{flex:1;min-width:14px;border-bottom:2px dotted var(--cc-dot);transform:translateY(-3px)}
.cc-grid .cc-row dd{font-weight:800;white-space:nowrap}

.cc-grid .cc-extra{margin-top:10px;font-size:13px;line-height:1.5;color:var(--cc-mut)}
.cc-grid .cc-extra .extra-highlight strong{font-weight:800;color:var(--cc-ink)}
.cc-grid .cc-extra .extra-highlight strong:after{content:' - '}
.cc-grid .cc-extra .extra-highlight span{display:inline;color:var(--cc-mut)}

.cc-grid .cc-specialfeat{margin-top:8px;font-size:12.5px;line-height:1.5;color:var(--cc-mut)}

.cc-grid .cc-promo{margin-top:10px;display:inline-flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:11px;color:var(--cc-mut)}
.cc-grid .cc-promo u{font-size:9.5px;letter-spacing:.14em;text-transform:uppercase}
.cc-grid .cc-promo code{
  font-family:ui-monospace,'SFMono-Regular',Menlo,Consolas,monospace;
  font-size:12.5px;font-weight:800;color:var(--cc-dk);border:1px dashed var(--cc-p);border-radius:5px;padding:4px 11px;
}

.cc-grid .cc-pay{margin-top:11px;display:flex;align-items:center;flex-wrap:wrap;gap:5px 14px;font-size:11.5px;color:var(--cc-mut)}
.cc-grid .cc-pay u{font-size:9px;letter-spacing:.14em;text-transform:uppercase}
.cc-grid .cc-pay span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.cc-grid .cc-pay svg{width:14px;height:14px;flex:0 0 14px;color:var(--cc-p)}

.cc-grid .cc-rg{margin-top:12px;font-size:10px;line-height:1.4;color:var(--cc-mut)}
.cc-grid .cc-rg p,.cc-grid .cc-rg span,.cc-grid .cc-rg div,.cc-grid .cc-rg strong{
  font-size:10px;line-height:1.4;display:inline;color:var(--cc-mut);
}

/* the fold exists only on a phone - here both parts stay out of the way */
.cc-grid .cc-tglbox{position:absolute;opacity:0;width:0;height:0;pointer-events:none}
.cc-grid .cc-tgl{display:none}

/* ---------- right column, fenced off by a dashed rule ---------- */
.cc-grid .cc-pn{
  padding:18px 20px;display:flex;flex-direction:column;align-items:center;justify-content:center;
  border-left:1px dashed var(--cc-line);
}
.cc-grid .cc-sc{
  font-family:'Barlow Condensed','Arial Narrow',system-ui,sans-serif;
  font-size:48px;font-weight:800;line-height:.9;color:var(--cc-p);
}
.cc-grid .cc-sclab{
  display:block;font-size:9px;letter-spacing:.18em;text-transform:uppercase;color:var(--cc-mut);
  margin-top:3px;text-align:center;
}
.cc-grid .cc-sclab b{display:block;font-weight:700;letter-spacing:.1em;margin-top:2px}
.cc-grid .cc-btn{
  display:block;width:100%;margin-top:13px;text-align:center;border-radius:8px;padding:13px;
  background:var(--cc-dk);color:#fff;
  font-weight:800;font-size:12.5px;letter-spacing:.08em;text-transform:uppercase;
  transition:background .2s ease;
}
.cc-grid .cc-btn:hover{background:var(--cc-p);color:#fff}
.cc-grid .cc-rev{display:block;margin-top:9px;font-size:11.5px;color:var(--cc-p);text-decoration:underline;text-underline-offset:3px}

/* ---------- the line under the table ---------- */
.cc-grid .cc-upd{
  display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;
  margin:2px 0 0;padding:11px 16px;border-radius:999px;
  background:var(--cc-soft);border:1px solid var(--cc-line);
  font-size:12.5px;font-weight:600;color:var(--cc-mut);text-align:center;
}
.cc-grid .cc-upd__e{font-size:15px;line-height:1}
.cc-grid .cc-upd time{font-weight:800;color:var(--cc-ink)}

@media (prefers-reduced-motion:reduce){
  .cc-grid .cc-card{transition:none}
  .cc-grid .cc-card:hover{transform:none}
}

/* ==========================================================================
   Tablet and phone
   ========================================================================== */
@media (max-width:900px){
  .cc-grid{gap:16px}
  .cc-grid .cc-card{grid-template-columns:44px 1fr;margin-left:28px}
  .cc-grid .cc-spine>b{font-size:19px;letter-spacing:.18em}
  .cc-grid .cc-lg{left:-26px;width:76px;height:76px;border-radius:16px;padding:7px}
  .cc-grid .cc-bd{padding:16px 16px 14px 62px}
  .cc-grid .cc-nm{font-size:24px}
  .cc-grid .cc-ld{grid-template-columns:1fr;gap:2px}

  /* the figures and the payment line fold behind one tap target, so a second
     brand reaches the first screen; the checkbox right before them drives it,
     so the card opens without any script */
  .cc-grid .cc-tgl{
    display:inline-flex;align-items:center;gap:8px;cursor:pointer;
    margin-top:11px;padding:4px 0;color:var(--cc-p);width:max-content;
    border-bottom:2px solid var(--cc-p);
    font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;
  }
  .cc-grid .cc-tgl i{
    width:8px;height:8px;flex:0 0 8px;border-right:2px solid var(--cc-p);border-bottom:2px solid var(--cc-p);
    transform:rotate(45deg) translate(-2px,-2px);transition:transform .2s ease;
  }
  .cc-grid .cc-tglbox:checked ~ .cc-tgl i{transform:rotate(-135deg) translate(-2px,-2px)}
  .cc-grid .cc-tglbox:not(:checked) ~ .cc-ld,
  .cc-grid .cc-tglbox:not(:checked) ~ .cc-extra,
  .cc-grid .cc-tglbox:not(:checked) ~ .cc-specialfeat,
  .cc-grid .cc-tglbox:not(:checked) ~ .cc-promo,
  .cc-grid .cc-tglbox:not(:checked) ~ .cc-pay,
  .cc-grid .cc-tglbox:not(:checked) ~ .cc-rg{display:none}
  .cc-grid .cc-tglbox:focus-visible ~ .cc-tgl{outline:2px solid var(--cc-p);outline-offset:2px}
  .cc-grid .cc-ld{margin-top:11px}

  /* the score and the button share one row at the foot of the card */
  .cc-grid .cc-pn{
    grid-column:1/-1;border-left:0;border-top:1px dashed var(--cc-line);
    flex-direction:row;align-items:center;gap:14px;padding:13px 16px 14px 62px;
  }
  .cc-grid .cc-sc{font-size:36px}
  .cc-grid .cc-sclab{margin-top:0;text-align:left;flex:0 0 auto}
  .cc-grid .cc-btn{width:auto;flex:1;margin-top:0;padding:12px 16px}
  .cc-grid .cc-rev{margin:0 0 0 auto}
}

/* ---- first screen of the table pages: the headings move up under the site
   header and step down a size, so the table starts higher. The file is linked
   only on the pages that carry the table, so the rules stay local to them. ---- */
@media (max-width:900px){
  /* a shallower header with a smaller mark lifts everything under it */
  header.header{padding-top:12px !important;padding-bottom:12px !important;margin-bottom:8px !important}
  header.header .logo-box{font-size:17px !important}
  header.header .logo-box > div{max-width:44px !important}

  main > .main-container > section:first-of-type{margin-bottom:16px !important}
  main > .main-container > section:first-of-type > .flex{margin-bottom:10px !important}
  main h1{font-size:25px !important;line-height:1.22 !important;margin-bottom:14px !important}
  main h2.title{font-size:21px !important;line-height:1.24 !important;margin-bottom:0 !important}
  /* the heading and the table are flex children of .textBox, so the space
     between them is its gap - the table has no margin of its own */
  .textBox:has(> .cc-grid){gap:9px !important}
  .cc-grid{margin-top:0 !important}
}

@media (max-width:560px){
  .cc-grid{margin:10px 0 20px;gap:14px}
  .cc-grid .cc-card{grid-template-columns:38px 1fr;margin-left:24px;border-radius:0 14px 14px 0}
  .cc-grid .cc-lg{left:-22px;width:66px;height:66px;border-radius:14px;border-width:2px}
  .cc-grid .cc-bd{padding:12px 14px 10px 52px}
  .cc-grid .cc-fe{margin-top:7px}
  .cc-grid .cc-tgl{margin-top:8px}
  .cc-grid .cc-nm{font-size:21px}
  .cc-grid .cc-nm i{font-size:9px;padding:3px 8px;margin-left:7px}
  .cc-grid .cc-of,.cc-grid .cc-of .bonus-main,.cc-grid .cc-of p{font-size:16px}
  .cc-grid .cc-pn{padding:10px 14px 11px 52px;flex-wrap:wrap}
  .cc-grid .cc-sc{font-size:31px}
  .cc-grid .cc-btn{font-size:11.5px;padding:12px}
}
