/* YoProfille · Design system compartilhado */
:root {
  /* Marca YOJOB (prevalece sobre as cores do DISC) */
  --yp-brand: #0372FF;        /* azul vivo */
  --yp-brand-deep: #161F5A;   /* azul profundo */
  --yp-brand-indigo: #4f6bff; /* variação controlada de índigo */
  --yp-contrast: #14216c;     /* azul de contraste (capas e botões), sem degradê */

  --yp-bg: #f5f7fc;
  --yp-surface: #ffffff;
  --yp-ink: #161F5A;
  --yp-muted: #64708f;
  --yp-line: #e5e9f3;
  --yp-primary: #0372FF;
  --yp-primary-2: #4f6bff;
  --yp-mais: #10b981;
  --yp-mais-soft: #ecfdf5;
  --yp-menos: #f43f5e;
  --yp-menos-soft: #fff1f3;
  --yp-shadow: 0 10px 30px rgba(22, 31, 90, .08);
  --yp-shadow-sm: 0 2px 10px rgba(22, 31, 90, .06);
  --yp-radius: 18px;
  /* Paleta DISC (secundária, semântica) */
  --d: #ef4444; --i: #f59e0b; --s: #10b981; --c: #3b82f6;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--yp-bg);
  color: var(--yp-ink);
  font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.yp-shell { max-width: 960px; margin: 0 auto; padding: 24px 20px 80px; }

/* Cabeçalho topo */
.yp-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 247, 251, .82);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--yp-line);
}
.yp-topbar__inner {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
}
.yp-brand { display: flex; align-items: center; }
.yp-brand-logo {
  display: block;
  width: auto;
  max-width: 200px;
  height: auto;
  object-fit: contain;
}
.yp-brand-logo--topbar { height: 24px; max-width: 180px; }
.yp-brand__mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--yp-contrast);
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800;
  box-shadow: 0 6px 16px rgba(20, 33, 108, .32);
}
.yp-brand small { display: block; font-weight: 600; color: var(--yp-muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.yp-topbar__spacer { flex: 1; }
.yp-back { color: var(--yp-muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.yp-back:hover { color: var(--yp-ink); }

/* Barra de progresso */
.yp-progress { display: flex; align-items: center; gap: 12px; }
.yp-progress__track { flex: 1; height: 8px; border-radius: 999px; background: var(--yp-line); overflow: hidden; }
.yp-progress__fill {
  height: 100%; width: 0%;
  background: var(--yp-primary);
  border-radius: 999px; transition: width .35s cubic-bezier(.2,.8,.2,1);
}
.yp-progress__label { font-size: 13px; font-weight: 700; color: var(--yp-muted); white-space: nowrap; }

/* Título de tela */
.yp-hero { text-align: center; margin: 26px 0 22px; }
.yp-hero h1 { font-size: clamp(22px, 4vw, 32px); margin: 0 0 8px; letter-spacing: -.02em; }
.yp-hero p { margin: 0 auto; max-width: 560px; color: var(--yp-muted); line-height: 1.55; }

/* Etiquetas Mais / Menos */
.yp-legend { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; }
.yp-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.yp-pill--mais { background: var(--yp-mais-soft); color: #047857; }
.yp-pill--menos { background: var(--yp-menos-soft); color: #be123c; }

/* Botões */
.yp-btn {
  appearance: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 700;
  padding: 12px 20px; border-radius: 12px;
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  text-decoration: none; transition: transform .12s ease, box-shadow .12s ease, background .2s ease, opacity .2s;
}
.yp-btn:active { transform: translateY(1px); }
.yp-btn--primary { background: var(--yp-contrast); color: #fff; box-shadow: 0 8px 20px rgba(20, 33, 108, .28); }
.yp-btn--primary:hover { background: #10184f; }
.yp-btn--ghost { background: #fff; color: var(--yp-ink); border: 1px solid var(--yp-line); }
.yp-btn--ghost:hover { border-color: #cfd3e0; }
.yp-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ====== Resultado ====== */
.yp-result { display: grid; gap: 18px; }
.yp-result__head {
  display: flex; align-items: center; gap: 18px;
  background: #fff; border-radius: var(--yp-radius); padding: 22px;
  box-shadow: var(--yp-shadow); border-left: 6px solid var(--pc, var(--yp-primary));
}
.yp-result__badge {
  width: 76px; height: 76px; flex: 0 0 76px; border-radius: 18px;
  background: var(--pc, var(--yp-primary)); color: #fff;
  display: grid; place-items: center; font-size: 24px; font-weight: 900; letter-spacing: .06em;
}
.yp-result__eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--yp-muted); font-weight: 700; }
.yp-result__title { margin: 3px 0 6px; font-size: 22px; letter-spacing: -.01em; }
.yp-result__desc { margin: 0; color: var(--yp-muted); }
.yp-result__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.yp-card { background: #fff; border-radius: var(--yp-radius); padding: 20px; box-shadow: var(--yp-shadow-sm); }
.yp-card__title { margin: 0 0 16px; font-size: 15px; }

.yp-res-bar { margin-bottom: 14px; }
.yp-res-bar__head { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 6px; }
.yp-res-bar__dot { width: 10px; height: 10px; border-radius: 50%; }
.yp-res-bar__val { margin-left: auto; font-weight: 800; }
.yp-res-bar__track { height: 10px; border-radius: 999px; background: var(--yp-line); overflow: hidden; }
.yp-res-bar__fill { height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.2,.8,.2,1); }

.yp-energies { display: flex; justify-content: space-around; gap: 10px; }
.yp-energy { text-align: center; }
.yp-energy__ring {
  width: 84px; height: 84px; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--yp-line) 0);
  display: grid; place-items: center; margin: 0 auto 8px;
}
.yp-energy__ring span {
  width: 62px; height: 62px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.yp-energy__label { font-size: 13px; color: var(--yp-muted); font-weight: 600; }

.yp-skills { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.yp-skills li { display: grid; grid-template-columns: 1fr 120px 44px; align-items: center; gap: 12px; font-size: 14px; }
.yp-skill__track { height: 8px; border-radius: 999px; background: var(--yp-line); overflow: hidden; }
.yp-skill__track i { display: block; height: 100%; background: var(--yp-primary); border-radius: 999px; }
.yp-skill__val { text-align: right; font-weight: 800; color: var(--yp-muted); }

.yp-result__actions { display: flex; gap: 12px; justify-content: center; margin-top: 6px; }

@media (max-width: 680px) {
  .yp-result__grid { grid-template-columns: 1fr; }
  .yp-skills li { grid-template-columns: 1fr 80px 40px; }
  .yp-result__head { flex-direction: column; text-align: center; }
}

/* ====== Modo auditoria ====== */
.yp-audit-toggle {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--yp-muted);
  background: #fff; border: 1px solid var(--yp-line); border-radius: 999px; padding: 6px 12px 6px 8px;
  user-select: none; transition: border-color .16s, color .16s, background .16s;
}
.yp-audit-toggle:hover { border-color: #cfd3e0; }
.yp-audit-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.yp-audit-toggle__sw { width: 34px; height: 20px; border-radius: 999px; background: var(--yp-line); position: relative; transition: background .18s; flex: 0 0 34px; }
.yp-audit-toggle__sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s; }
.yp-audit-toggle input:checked + .yp-audit-toggle__sw { background: var(--yp-primary); }
.yp-audit-toggle input:checked + .yp-audit-toggle__sw::after { transform: translateX(14px); }
.yp-audit-toggle input:checked ~ .yp-audit-toggle__txt { color: var(--yp-primary); }

/* Chip de fator */
.yp-fac { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-size: 11px; font-weight: 800; color: #fff; vertical-align: middle; }
.yp-fac--D { background: var(--d); }
.yp-fac--I { background: var(--i); }
.yp-fac--S { background: var(--s); }
.yp-fac--C { background: var(--c); }

/* Peso (pontos) */
.yp-wt { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.yp-wt--mais { background: var(--yp-mais-soft); color: #047857; }
.yp-wt--menos { background: var(--yp-menos-soft); color: #be123c; }
.yp-wt--neutro { background: #f2f3f9; color: #6b7280; }

/* Painel ao vivo */
.yp-live { background: #fff; border: 1px solid var(--yp-line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--yp-shadow-sm); margin: 14px 0 4px; }
.yp-live__head { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--yp-ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.yp-live__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yp-primary); box-shadow: 0 0 0 4px rgba(99,102,241,.18); animation: yp-pulse 1.6s infinite; }
@keyframes yp-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.yp-live__meta { font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--yp-muted); font-size: 11px; }
.yp-live__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.yp-live__f { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "k raw" "bar bar" "pct pct"; gap: 4px 8px; align-items: center; background: #fafbfe; border-radius: 10px; padding: 8px; }
.yp-live__k { grid-area: k; }
.yp-live__raw { grid-area: raw; text-align: right; font-weight: 800; font-size: 14px; }
.yp-live__raw small { font-weight: 600; color: var(--yp-muted); font-size: 10px; margin-left: 2px; }
.yp-live__bar { grid-area: bar; height: 6px; border-radius: 999px; background: var(--yp-line); overflow: hidden; }
.yp-live__bar i { display: block; height: 100%; border-radius: 999px; transition: width .35s ease; }
.yp-live__pct { grid-area: pct; font-size: 12px; font-weight: 700; color: var(--yp-muted); }
.yp-live__note { font-size: 11px; color: var(--yp-muted); margin-top: 8px; }

/* ====== Tooltip de glossário (descrição do adjetivo) ====== */
.yp-tip {
  position: absolute;
  z-index: 60;
  max-width: 288px;
  padding: 10px 13px;
  border-radius: 12px;
  background: #1e2233;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(30, 34, 51, .28);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease;
}
.yp-tip.is-visible { opacity: 1; transform: translateY(0); }
.yp-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: var(--yp-tip-arrow, 50%);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1e2233;
}
.yp-tip--below::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: #1e2233;
}
/* dica visual de que o texto tem descrição */
[data-yp-tip] { cursor: help; }
.opt[data-yp-tip], .chip[data-yp-tip] { cursor: pointer; }

/* Tabelas de auditoria no relatório */
.yp-audit__rule { font-size: 13px; color: var(--yp-muted); line-height: 1.55; margin: 0 0 14px; }
.yp-audit__h { font-size: 13px; margin: 18px 0 8px; color: var(--yp-ink); }
.yp-audit__order { font-size: 15px; font-weight: 700; }
.yp-atable-wrap { max-height: 360px; overflow: auto; border: 1px solid var(--yp-line); border-radius: 10px; }
.yp-atable { width: 100%; border-collapse: collapse; font-size: 13px; }
.yp-atable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--yp-muted); padding: 8px 10px; border-bottom: 1px solid var(--yp-line); position: sticky; top: 0; background: #fff; }
.yp-atable td { padding: 8px 10px; border-bottom: 1px solid #f1f2f8; }
.yp-atable .rt { text-align: right; white-space: nowrap; }
.yp-atable .muted { color: #aab; }
.yp-atable .blk { font-weight: 800; color: var(--yp-muted); background: #fafbfe; text-align: center; vertical-align: middle; }
.yp-atable--blocks tr.is-mais td { background: var(--yp-mais-soft); }
.yp-atable--blocks tr.is-menos td { background: var(--yp-menos-soft); }
.yp-atable--blocks tr.is-mais td.blk, .yp-atable--blocks tr.is-menos td.blk { background: #fafbfe; }
