@import './tokens.css';

/* ===== TYPOGRAPHY ===== */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
}
.wordmark { font-weight: 800; letter-spacing: -.5px; }
.brand {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.3px;
}
.brand em {
  font-style: italic;
  color: var(--primary);
}
h1.display {
  font-weight: 800;
  font-size: 34px;
  line-height: 1.04;
  letter-spacing: -.6px;
  margin: 10px 0 12px;
}
h1.display em { font-style: italic; color: var(--primary); }
.lead { font-size: 15px; line-height: 1.5; color: var(--soft); }
.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--soft);
  margin: 24px 0 11px;
  padding-bottom: 9px;
  border-bottom: 1.5px solid var(--line);
}
.steptag {
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-context {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .8px;
  color: var(--faint);
  text-transform: uppercase;
}
.match {
  font-style: italic;
  font-weight: 700;
  color: var(--green);
  background: var(--green-tint);
  padding: 3px 9px;
  border-radius: 8px;
  display: inline-block;
}
.verif {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: .3px;
  background: var(--green-tint);
  padding: 4px 10px;
  border-radius: 99px;
}

/* ===== STEP DOTS — stile Duolingo ===== */
.sdots {
  display: flex;
  align-items: center;
  gap: 5px;
}
.sd {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(194,65,12,.16);
  transition: all .28s cubic-bezier(.22,.9,.32,1);
  flex: 0 0 auto;
}
.sd.done {
  background: rgba(194,65,12,.42);
}
.sd.cur {
  width: 22px;
  border-radius: 99px;
  background: var(--primary);
}

/* ===== COUNTER ANIMATION ===== */
@keyframes countBump {
  0%   { transform: translateY(6px); opacity: 0; }
  100% { transform: translateY(0);   opacity: 1; }
}
.counter-val { display: inline-block; }
.counter-val.bump { animation: countBump .22s ease-out; }

/* ===== BUTTONS ===== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 15.5px;
  padding: 16px;
  border-radius: 16px;
  transition: box-shadow .18s, transform .12s;
  letter-spacing: .1px;
}
.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}
.btn-primary:active {
  transform: scale(.99);
  background: var(--primary-dark);
}
.btn-primary:disabled { background: rgba(194,65,12,.45); }
.btn-ghost {
  /* outlined come GhostButton dell'app */
  background: none;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px rgba(33,28,21,.25);
}
.btn-ghost:active { background: rgba(33,28,21,.06); }
.btn-amber { background: var(--amber); color: #fff; }
.btn-text {
  background: none;
  color: var(--soft);
  font-weight: 600;
  font-size: 14px;
  padding: 12px;
  cursor: pointer;
  border: none;
  width: 100%;
}
.iconbtn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--ink);
  cursor: pointer;
  transition: background .15s;
}
.iconbtn:active { background: rgba(33,28,21,.07); }
.iconbtn.flat {
  background: none;
  color: var(--soft);
}
.iconbtn.flat:active {
  background: rgba(194,65,12,.09);
  color: var(--primary);
}
.cta-bar {
  flex: 0 0 auto;
  padding: 14px 22px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(245,239,230,.97) 68%, rgba(245,239,230,0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ===== CARD ===== */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.card.dark {
  background: var(--dark);
  color: #F5EFE6;
  border: 1px solid var(--dark);
}
.row { display: flex; align-items: center; gap: 13px; }
.divider { height: 1px; background: var(--line2); margin: 16px 0; }

/* ===== PILLS ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .4px;
  padding: 6px 11px;
  border-radius: 999px;
}
.pill.green  { background: var(--green-tint); color: var(--green); }
.pill.amber  { background: var(--amber-tint); color: var(--amber); }
.pill.gold   { background: var(--gold-tint); color: var(--gold); }

/* ===== CHIPS — con bounce Duolingo ===== */
@keyframes chipPop {
  0%   { transform: scale(1); }
  36%  { transform: scale(1.16); }
  66%  { transform: scale(.93); }
  100% { transform: scale(1); }
}
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 15px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .12s;
  user-select: none;
  color: var(--ink);
}
.chip .em { font-size: 18px; line-height: 1; }
.chip:active {
  transform: scale(.91);
}
.chip.selected {
  /* come SelectableChip dell'app: inverseSurface (Ink) su testo crema */
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
  border-color: var(--ink);
  animation: chipPop .3s cubic-bezier(.36,.07,.19,.97) both;
}
.chip.sm { padding: 8px 12px; font-size: 13px; border-radius: 999px; min-height: 36px; }
.chip.sm.selected {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

/* ===== SCROLLTABS — fade Airbnb ===== */
.scrolltabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 0 -22px;
  padding-left: 22px;
  padding-right: 22px;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 6%,
    black 91%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 6%,
    black 91%,
    transparent 100%
  );
}
.scrolltabs::-webkit-scrollbar { height: 0; }
.scrolltabs .chip { flex: 0 0 auto; }

/* ===== PROGRESS BAR — con glow ===== */
.progress {
  height: 5px;
  background: rgba(33,28,21,.10);
  border-radius: 99px;
  overflow: hidden;
  margin: 10px 0 4px;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
  transition: width .45s cubic-bezier(.22,.9,.32,1);
}

/* ===== PROFILE SELECT CARDS ===== */
.psel {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 17px;
  cursor: pointer;
  transition: background .18s;
}
.psel:active { background: var(--paper2); }
.psel .ic {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(194,65,12,.10);
  color: var(--primary);
}
.psel .tt { font-size: 16.5px; font-weight: 600; }
.psel .ds { font-size: 12.5px; color: var(--soft); margin-top: 2px; }
.psel .ar { margin-left: auto; color: var(--faint); font-size: 22px; }

/* ===== OFFER CARD — struttura LinkedIn ===== */
.offer {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  transition: background .16s;
  position: relative;
  overflow: hidden;
}
.offer::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: opacity .2s;
}
.offer:active {
  background: var(--paper2);
}
.offer:active::before { opacity: 1; }
.offer .tt { font-size: 16px; font-weight: 600; }
.offer .co { font-size: 12.5px; color: var(--soft); margin-top: 1px; }
.offer .meta { font-size: 13px; color: var(--ink); margin-top: 9px; font-weight: 500; }
.offer .meta b { color: var(--green); }

/* ===== AVATAR ===== */
.avatar {
  /* come Avatar dell'app: cerchio, tinta primary 14%, iniziali primary */
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(194,65,12,.14);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex: 0 0 46px;
}
.avatar.amber { background: var(--amber-tint); color: var(--amber); }
.avatar.gold  { background: var(--gold-tint); color: var(--gold); }

/* ===== KPI GRID ===== */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.kpi {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 15px;
}
.kpi .n { font-size: 28px; font-weight: 800; line-height: 1; letter-spacing: -.5px; }
.kpi .l { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--soft); margin-top: 5px; }
.kpi.hl {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}
.kpi.hl .l { color: rgba(255,255,255,.7); }

/* ===== BAR LINES ===== */
.barline { display: flex; align-items: center; gap: 11px; margin: 11px 0; }
.barline .lb { font-size: 13.5px; min-width: 130px; font-weight: 500; }
.barline .tr { flex: 1; height: 7px; background: rgba(33,28,21,.10); border-radius: 99px; overflow: hidden; }
.barline .tr i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.barline .vv { font-size: 12.5px; font-weight: 700; color: var(--green); min-width: 34px; text-align: right; }

/* ===== LIST ITEMS ===== */
.list-item {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 13px 0;
  border-bottom: 1px solid var(--line2);
}
.list-item:last-child { border-bottom: none; }

/* ===== TAB BAR — NavigationBar M3 come l'app (AppTabBar) ===== */
.tabbar {
  flex: 0 0 auto;
  display: flex;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 10px 8px calc(12px + env(safe-area-inset-bottom));
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--soft);
  cursor: pointer;
  padding: 4px;
  min-height: 48px;
  justify-content: center;
  transition: color .2s;
  position: relative;
}
.tab::before {
  /* pillola indicatore — primaryContainer */
  content: '';
  position: absolute;
  top: 1px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 58px;
  height: 30px;
  background: var(--primary-tint);
  border-radius: 16px;
  transition: transform .26s cubic-bezier(.22,.9,.32,1);
  z-index: 0;
}
.tab.active::before { transform: translateX(-50%) scale(1); }
.tab .ti {
  font-size: 19px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.tab > span,
.tab > div:not(.ti) { position: relative; z-index: 1; }
.tab.active { color: var(--ink); font-weight: 700; }
.tab.active .ti { color: var(--primary); }
.tab .badge {
  position: absolute;
  top: -2px;
  right: 50%;
  margin-right: -22px;
  background: var(--primary);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  z-index: 2;
}

/* ===== VERIFY ROWS ===== */
.vrow {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line2);
}
.vrow:last-child { border-bottom: none; }
.vrow .ck {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex: 0 0 30px;
}
.vrow .ck.done { background: var(--green); color: #fff; }
.vrow .ck.idle { background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--faint); }
.vrow .tt { font-size: 14.5px; font-weight: 600; }
.vrow .ds { font-size: 12px; color: var(--soft); margin-top: 1px; }
.vrow .ar { margin-left: auto; color: var(--faint); }

/* ===== NOTE BOX ===== */
.note {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 15px;
  font-size: 12.5px;
  color: var(--soft);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.note .ic { color: var(--primary); font-size: 15px; }

/* ===== COACH BOX — come CoachBox dell'app (tertiaryContainer) ===== */
.coach {
  background: var(--amber-tint);
  color: var(--ink);
  border: 1px solid rgba(180,83,9,.15);
  border-radius: 16px;
  padding: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  position: relative;
}
.coach .tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== VIDEO RECORDER ===== */
.recorder {
  aspect-ratio: 3/4;
  background: var(--dark);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #F5EFE6;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.recorder video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.recorder .ring { position: relative; }
.recorder .ring,
.recorder .timer,
.recorder .hint {
  z-index: 2;
}
.recorder .ring {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 3px solid rgba(245,239,230,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .2s;
}
.recorder .ring i {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  transition: .25s;
}
.recorder.rec .ring i { border-radius: 7px; width: 26px; height: 26px; }
.recorder .timer {
  position: absolute;
  top: 16px;
  font-size: 14px;
  font-weight: 600;
  background: rgba(0,0,0,.4);
  padding: 4px 12px;
  border-radius: 99px;
}
.recorder .recdot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
  margin-right: 6px;
  animation: blink 1s infinite;
}
@keyframes blink { 50% { opacity: .2; } }
.recorder .hint {
  position: absolute;
  bottom: 18px;
  font-size: 12px;
  color: rgba(245,239,230,.7);
  padding: 0 24px;
  text-align: center;
}

/* ===== FORM FIELDS — recessed neomorphic ===== */
.field { margin-top: 13px; }
.field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--soft);
  display: block;
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  /* outlined come i campi M3 dell'app: superficie chiara + bordo */
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: none;
  border-radius: 14px;
  padding: 13px 15px;
  box-shadow: var(--shadow-in);
  transition: .16s;
}
.field input::placeholder,
.field textarea::placeholder { color: #8A7F6E; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--primary);
}
.aifill { box-shadow: inset 0 0 0 2px rgba(194,65,12,.55) !important; }
.field label .req { color: var(--primary); text-transform: none; }
.field input.err,
.field select.err,
.field textarea.err {
  box-shadow: inset 0 0 0 2px var(--err);
}

/* ===== AUTOCOMPLETE COMUNI ===== */
.ac-field { position: relative; }
.ac-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 30;
  margin-top: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15,10,5,.16);
  overflow: hidden;
  max-height: 232px;
  overflow-y: auto;
}
.ac-item {
  padding: 11px 15px;
  font-size: 14.5px;
  color: var(--ink);
  cursor: pointer;
}
.ac-item:hover,
.ac-item.active { background: rgba(194,65,12,.10); }
.ac-item + .ac-item { border-top: 1px solid rgba(15,10,5,.05); }

/* ===== AI LOADER ===== */
.aiload {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  font-size: 13.5px;
  color: var(--soft);
}
.spin {
  width: 20px; height: 20px;
  border: 2.5px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: sp .7s linear infinite;
  flex: 0 0 20px;
}
@keyframes sp { to { transform: rotate(360deg); } }

/* ===== PLAN CARD — dark card come l'app ===== */
.plan {
  background: var(--dark);
  color: #F5EFE6;
  border-radius: 18px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.plan::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(245,239,230,.07);
}
.plan::before {
  content: "";
  position: absolute;
  left: -20px; bottom: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.plan .price { font-size: 44px; font-weight: 800; line-height: 1; margin: 6px 0 2px; letter-spacing: -1px; }
.plan .per { font-size: 13px; color: rgba(255,255,255,.65); font-weight: 500; }
.plan ul { list-style: none; margin: 18px 0 0; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; padding: 7px 0; color: rgba(255,255,255,.85); }
.plan li .c { color: var(--gold); font-weight: 700; flex: 0 0 auto; }
.plan-tag {
  position: absolute;
  top: 18px; right: 18px;
  background: rgba(245,239,230,.14);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .6px;
  padding: 6px 11px;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,.12);
}

/* ===== REVIEWS ===== */
.stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; }
.review { padding: 13px 0; border-bottom: 1px solid var(--line2); }
.review:last-child { border-bottom: none; }
.review .who { font-size: 13.5px; font-weight: 600; }
.review .tx { font-size: 13px; color: var(--soft); line-height: 1.45; margin-top: 4px; }

/* ===== WHATSAPP THREAD ===== */
.wa { display: flex; flex-direction: column; gap: 10px; }
.wamsg {
  max-width: 84%;
  padding: 11px 13px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.45;
}
.wamsg.in {
  background: var(--paper);
  border: 1px solid var(--line);
  align-self: flex-start;
  border-bottom-left-radius: 5px;
}
.wamsg.out {
  background: var(--green);
  align-self: flex-end;
  border-bottom-right-radius: 5px;
  color: #fff;
}
.wamsg .t { font-size: 10px; color: var(--faint); margin-top: 5px; text-align: right; }
.wamsg.out .t { color: rgba(255,255,255,.5); }
.wacard {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  align-self: flex-start;
  max-width: 88%;
}
.wacard .vthumb {
  height: 120px;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F5EFE6;
  font-size: 30px;
  position: relative;
}
.wacard .vthumb .pl {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(245,239,230,.92);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  padding-left: 3px;
}
.wacard .vc { padding: 12px 13px; }
.wacard .vc .tt { font-size: 13.5px; font-weight: 600; }
.wacard .vc .ds { font-size: 11.5px; color: var(--soft); margin-top: 2px; }
.miniact { display: flex; gap: 8px; margin-top: 10px; }
.miniact button {
  flex: 1;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
.miniact button.go {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

/* ===== TOAST — snackbar M3: inverseSurface (Ink) su testo crema ===== */
.toast {
  position: absolute;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--cream);
  font-size: 13.5px;
  font-weight: 500;
  padding: 13px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: .3s;
  z-index: 80;
  max-width: 300px;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== FOUNDER CARD ===== */
.founder {
  background: var(--dark);
  color: #FFFFFF;
  border-radius: 18px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}
.founder .st { font-size: 22px; color: var(--gold); }
.founder .tt { font-size: 14.5px; font-weight: 600; }
.founder .ds { font-size: 12px; color: rgba(245,239,230,.6); margin-top: 2px; }

/* ===== CHIUDI ANNUNCIO ===== */
.ad-close {
  margin-top: 10px;
  border: none;
  background: none;
  padding: 4px 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--err);
  cursor: pointer;
}

/* ===== FLAT FLAGS ===== */
.flag {
  display: inline-block;
  width: 18px;
  height: 13px;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
  vertical-align: middle;
  position: relative;
  margin-right: 1px;
}
/* Tricolori verticali */
.f-it { background: linear-gradient(90deg,#009246 33.3%,#fff 33.3% 66.6%,#ce2b37 66.6%); }
.f-fr { background: linear-gradient(90deg,#002395 33.3%,#fff 33.3% 66.6%,#ED2939 66.6%); }
.f-ro { background: linear-gradient(90deg,#002B7F 33.3%,#FCD116 33.3% 66.6%,#CE1126 66.6%); }
/* Bicolori orizzontali */
.f-ua { background: linear-gradient(180deg,#005BBB 50%,#FFD500 50%); }
.f-es { background: linear-gradient(180deg,#AA151B 25%,#F1BF00 25% 75%,#AA151B 75%); }
/* SVG flags per bandiere complesse */
.f-gb {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Crect width='60' height='40' fill='%23012169'/%3E%3Cpath d='M0 0L60 40M60 0L0 40' stroke='%23fff' stroke-width='11'/%3E%3Cpath d='M0 0L60 40M60 0L0 40' stroke='%23C8102E' stroke-width='6'/%3E%3Crect x='22' width='16' height='40' fill='%23fff'/%3E%3Crect y='14' width='60' height='12' fill='%23fff'/%3E%3Crect x='24' width='12' height='40' fill='%23C8102E'/%3E%3Crect y='16' width='60' height='8' fill='%23C8102E'/%3E%3C/svg%3E") center/cover;
}
.f-gb::before,
.f-gb::after { content: none; }
/* Monocromatici semplificati */
.f-al {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Crect width='60' height='40' fill='%23E41E20'/%3E%3Cpath fill='%23111' d='M30 6L27 3 25 7 27 10 22 9 16 13 23 16 21 19 26 17 27 22 24 27 28 25 28 33 30 26 32 33 32 25 36 27 33 22 34 17 39 19 37 16 44 13 38 9 33 10 35 7 33 3Z'/%3E%3C/svg%3E") center/cover;
}
.f-sa { background: #006C35; }
.f-pk { background: #01411C; }
.f-ng { background: linear-gradient(90deg,#008751 33.3%,#fff 33.3% 66.6%,#008751 66.6%); }
.f-in { background: linear-gradient(90deg,#FF9933 33.3%,#fff 33.3% 66.6%,#138808 66.6%); }
.f-ma { background: linear-gradient(180deg,#c1272d 50%,#006233 50%); }
