/* ==========================================================================
   RBF Latam — Diagnóstico rápido de maturidade em GRCorp
   ========================================================================== */

.diag-head {
  position: relative;
  color: #fff;
  background:
    radial-gradient(760px 340px at 84% -20%, rgba(0, 157, 224, .30), transparent 60%),
    linear-gradient(150deg, var(--navy-950) 0%, var(--navy) 62%, var(--navy-600) 100%);
  padding: clamp(40px, 6vw, 72px) 0 clamp(44px, 6vw, 80px);
}
.diag-head h1 { color: #fff; max-width: 22em; margin: 14px 0 18px; }
.diag-head .lead { color: #C8D0E8; max-width: 40em; }
.diag-head .crumbs { font-size: .82rem; color: rgba(255, 255, 255, .62); display: flex; gap: 8px; align-items: center; }
.diag-head .crumbs a { color: rgba(255, 255, 255, .82); text-decoration: none; }
.diag-head .crumbs a:hover { color: #fff; text-decoration: underline; }
.diag-head .eyebrow { color: #8FD8F6; }
.diag-head .eyebrow::before { background: var(--azure); }
.diag-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; }
.diag-chips li {
  font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  padding: 7px 14px; border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, .22); color: #D5DEF3;
  background: rgba(255, 255, 255, .06);
}

/* finestra a tutta larghezza: segue la griglia del sito */
.diag { max-width: none; margin: 0; }

/* card */
.d-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--azure);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(24px, 4vw, 40px);
  outline: none;
}
.d-card h2 { color: var(--navy); font-size: clamp(1.45rem, 2.4vw, 1.9rem); margin: 0 0 14px; }
.d-card h3 { color: var(--navy); font-size: clamp(1.1rem, 1.7vw, 1.3rem); margin: 0 0 16px; }
.d-card p { color: var(--body); max-width: 82ch; }
.d-card p:last-child { margin-bottom: 0; }

.d-tag {
  font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--azure-700); margin-bottom: 10px;
}
.d-mute { color: var(--muted); font-size: .9rem; }

/* progress */
.d-prog { height: 6px; background: var(--surface-3); border-radius: 100px; overflow: hidden; margin-bottom: 18px; }
.d-prog i { display: block; height: 100%; width: 0; background: var(--azure); transition: width .25s var(--ease); }

/* question options */
.d-opt {
  display: block; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 15px 18px; margin: 0 0 12px;
  font: inherit; font-size: .95rem; line-height: 1.5; color: var(--body);
  cursor: pointer; position: relative;
  transition: border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease), transform .16s var(--ease);
}
.d-opt:hover { border-color: var(--navy-600); background: #FBFCFE; transform: translateY(-1px); }
.d-opt:focus-visible { outline: 3px solid rgba(0, 157, 224, .45); outline-offset: 2px; }
.d-opt.sel {
  border-color: var(--navy); background: #F1F6FD;
  box-shadow: inset 3px 0 0 var(--azure);
  color: var(--ink);
}
.d-opt.dk { color: var(--muted); font-style: italic; }

/* buttons */
.d-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 100px; border: 1px solid transparent;
  background: var(--azure-700); color: #fff;
  font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: background .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
  box-shadow: 0 10px 24px -16px rgba(0, 119, 173, .9);
}
.d-btn:hover { background: var(--azure-900); transform: translateY(-1px); }
.d-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.d-btn.d-ghost { background: transparent; color: var(--navy); border-color: #CBD1E4; box-shadow: none; }
.d-btn.d-ghost:hover { background: #F7F8FC; border-color: var(--navy); }
.d-link {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--azure-700);
  text-decoration: underline; text-underline-offset: 2px;
}
.d-link:hover { color: var(--azure-900); }

.d-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; align-items: center; justify-content: space-between; }

/* score */
.d-score { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 8px 0 6px; }
.d-score b { font-size: clamp(2.6rem, 6vw, 3.6rem); color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.d-score span { font-size: 1.2rem; font-weight: 700; color: var(--azure-700); }

/* bars */
.d-bar { margin: 0 0 16px; }
.d-bar .t { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; margin-bottom: 6px; color: var(--body); }
.d-bar .t b { color: var(--navy); }
.d-bar .track { position: relative; height: 14px; background: var(--surface-3); border-radius: 100px; }
.d-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--navy); border-radius: 100px; }
.d-bar .goal { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--azure); }
.d-goal-key {
  position: relative; display: inline-block; width: 18px; height: 9px;
  background: var(--surface-3); border-radius: 100px;
  vertical-align: 0; margin-right: 5px;
}
.d-goal-key::after {
  content: ""; position: absolute; left: 70%; top: -2px; bottom: -2px;
  width: 2px; background: var(--azure);
}

.d-gap {
  background: var(--azure-050);
  border-left: 4px solid var(--azure);
  border-radius: 6px;
  padding: 16px 18px;
  margin: 20px 0;
  color: var(--body);
}
.d-gap .d-tag { margin-bottom: 6px; }

/* form */
.d-card label { display: block; font-weight: 600; font-size: .86rem; margin: 0 0 5px; color: var(--navy); }
.d-card label.d-chk { font-weight: 400; }
.d-card select, .d-card input[type=text], .d-card input[type=email] {
  width: 100%; padding: 12px 14px; border: 1px solid #C9CFDE; border-radius: 10px;
  font: inherit; font-size: .95rem; color: var(--ink); background: #fff; margin-bottom: 16px;
  max-width: 540px;
}
.d-card select:focus, .d-card input:focus { outline: none; border-color: var(--azure-700); box-shadow: 0 0 0 3px rgba(0, 157, 224, .18); }
.d-chk { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--muted); margin: 4px 0 14px; }
.d-chk input { margin-top: 3px; flex: none; }
.d-err { color: #B3261E; font-size: .86rem; margin: -6px 0 12px; }

.d-disc {
  font-size: .78rem; line-height: 1.55; color: var(--muted);
  margin: 22px 0 0; border-top: 1px solid var(--line); padding-top: 14px;
}
.d-again { margin: 14px 0 0; }
.d-hide { display: none !important; }

@media (max-width: 560px) {
  .d-btn { width: 100%; }
  .d-row { flex-direction: column-reverse; align-items: stretch; }
  .d-row .d-mute { text-align: center; }
  .d-opt { font-size: .92rem; }
}

@media print {
  .langbar, .site-header, .site-footer, .diag-head .crumbs, .diag-head .diag-chips,
  #rbf-lead, .site-header__inner, .nav-toggle, .d-again { display: none !important; }
  .diag-head { background: #fff !important; color: #000 !important; padding: 0 0 12px; }
  .diag-head h1, .diag-head .lead { color: #000 !important; }
  .d-card { border: 0; box-shadow: none; padding: 0; }
}

/* honeypot anti-bot: fuori schermo, invisibile agli utenti */
#rbf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
