/* ─────────────────────────────────────────────────────────────────────────
   HALA TIER MARKS — the single definition of the three-tier system.

   sofias-pick   double ring + Sofia's drawn S   been in person, personally obsessed
   hala-vetted   single ring + the house H       been first-hand, cleared the bar
   the-cut       dashed ring, unstamped          research-verified, not yet visited

   Everything that renders a tier links this file: the guide badges, the SSR
   venue pages, /the-index, how-we-choose and the directory filters. There is
   no second copy — the badge rules used to be pasted into 11 guide files and
   drifted into two different terracottas, which is what this replaces.

   The S is defined ONCE, below, as a data-URI mask painted with currentColor,
   so the mark inherits the country accent (terracotta on Italy, Aegean on
   Greece) without the path being repeated in a single line of markup.

   Tier is never carried by colour alone: the ring COUNT and the border STYLE
   differ, so the three stay distinguishable in greyscale, in print, and if the
   mask fails to load.
   ───────────────────────────────────────────────────────────────────────── */

:root{
  /* #6E685C was only 4.25:1 on the stone ground, and the label is 9.5px, so it
     needed 4.5. This clears AA on every surface the badge lands on:
     4.87 stone · 5.28 guide paper · 5.53 index paper · 5.97 raised. */
  --tier-mute:   #655F53;
  /* Sofia's signature. Measured centring: translate(-0.04 0.39) puts the
     stroked bounding box dead centre in the 24-unit viewBox. */
  --tier-s: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g transform="translate(-0.04 0.39)"><path d="M15.9 6.4C14.7 4.7 11.9 4.2 10.3 5.6 8.7 7 9.3 9.2 11 10.3c1.7 1.1 4.1 1.8 5 3.4.9 1.7-.5 4-2.8 4.6-2.1.5-4.3-.4-5.4-2.1" fill="none" stroke="black" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/></g></svg>');
}

.hala-badge{
  display:inline-flex; align-items:center; gap:7px;
  font-family:var(--fu, ui-sans-serif, system-ui, sans-serif);
  font-size:9.5px; font-weight:600; letter-spacing:.12em; text-transform:uppercase;
  line-height:1; white-space:nowrap; vertical-align:middle;
  background:none; border:0; padding:0; margin-left:.5rem;
  /* Resolved HERE, not at :root. --tier-accent on :root would compute once and
     inherit as a fixed colour, so a section that re-declares --tile would be
     ignored. Reading --tile at the badge is what the per-page rules did before
     the migration, and it is what makes the country accent inherit.
     --tier-accent stays available as an explicit per-surface override. */
  color:var(--tier-accent, var(--tile, #B25238));
}
.hala-badge--the-cut{ color:var(--tier-mute); }

.hala-badge__mark{
  width:22px; height:22px; flex:0 0 auto; position:relative;
  border-radius:50%; border:1.15px solid currentColor;
  display:inline-grid; place-items:center;
  font-family:var(--fh, Georgia, serif); font-size:10px; font-weight:600; line-height:1;
  background:none;
}
/* Sofia's Pick — the inner ring, then the signature */
.hala-badge--sofias-pick .hala-badge__mark::before{
  content:""; position:absolute; inset:2px;
  border:1.15px solid currentColor; border-radius:50%;
}
.hala-badge--sofias-pick .hala-badge__mark::after{
  content:""; width:13px; height:13px; background-color:currentColor;
  -webkit-mask:var(--tier-s) center / contain no-repeat;
          mask:var(--tier-s) center / contain no-repeat;
}
/* The Cut — never stamped */
.hala-badge--the-cut .hala-badge__mark{ border-style:dashed; }

/* Stacked, for legends and the explainer */
.hala-badge--block{ margin-left:0; }

/* Print: borders and labels always print; the masked signature may not, which
   is why the ring count carries the tier on its own. */
@media print{
  .hala-badge{ color:#000 !important; }
  .hala-badge--the-cut{ color:#444 !important; }
}

@media (forced-colors: active){
  .hala-badge__mark{ border-color:CanvasText; }
  .hala-badge--sofias-pick .hala-badge__mark::before{ border-color:CanvasText; }
  .hala-badge--sofias-pick .hala-badge__mark::after{ background-color:CanvasText; }
}
