/* ════════════════════════════════════════════════════════════════════════
   Alloy ID v3 — shared design layer (see docs/design-principles-alloyid.md)
   Used by the public prototype (profile-v3.html) AND the authed employer page
   (employer.html). Loaded after verified-resume.css; !important beats the
   late-injected matrix styles.
   ════════════════════════════════════════════════════════════════════════ */
* {
  box-sizing: border-box;
}
:root {
  --bg: #08090c;
  --rail: 64px;
  --text: #eef1f5;
  --pink: #eeb2f4;
  --teal: #14b8a6;
  --violet: #a78bfa;
  --green: #34d399;
  --muted: #5c6470;
  --dim: #98a0ac;
  --line: rgba(255, 255, 255, 0.07);
  --mono: 'Space Mono', monospace;
  --sans: 'Manrope', system-ui, sans-serif;
  /* spacing scale — use ONLY these */
  --s1: 6px;
  --s2: 8px;
  --s3: 12px;
  --s4: 14px;
  --s5: 18px;
  --s6: 22px;
  --s7: 30px;
  --s8: 34px;
  --s9: 42px;
  --s10: 54px;
  /* easing — all UI motion */
  --eo: cubic-bezier(0.23, 1, 0.32, 1);
}
html,
body {
  margin: 0;
}
body {
  background: var(--bg);
  color: #eef1f5;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-left: var(--rail);
}
.v3glow {
  position: fixed;
  top: -60px;
  left: calc(50% + 32px);
  transform: translateX(-50%);
  width: 900px;
  height: 520px;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  opacity: 0.7;
}
.v3glow .o {
  position: absolute;
  border-radius: 50%;
}
.v3glow .o1 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(238, 178, 244, 0.32), transparent 66%);
  top: 0;
  left: 8%;
  animation: v3o1 9s ease-in-out infinite;
}
.v3glow .o2 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.26), transparent 66%);
  top: 10%;
  right: 8%;
  animation: v3o2 11s ease-in-out infinite;
}
.v3glow .o3 {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.28), transparent 66%);
  top: 4%;
  left: 42%;
  animation: v3o3 10s ease-in-out infinite;
}
@keyframes v3o1 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(24px, 18px);
  }
}
@keyframes v3o2 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-22px, 16px);
  }
}
@keyframes v3o3 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(16px, -14px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .v3glow .o {
    animation: none;
  }
}
.v3rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  background: #17171c;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 60;
  padding: 20px 0;
}
.v3rail .lm {
  color: var(--pink);
  filter: drop-shadow(0 0 7px rgba(238, 178, 244, 0.45));
  margin-bottom: 26px;
}
.v3rail .ic {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b5f7a;
  font-family: var(--mono);
  font-size: 14px;
  border-radius: 11px;
  margin-bottom: 4px;
}
.v3rail .ic.on {
  color: var(--pink);
  background: rgba(238, 178, 244, 0.08);
}
.v3wrap {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 54px 28px 90px;
}
.v3top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 54px;
}
.v3top .brand {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--dim);
}
.v3top .brand b {
  color: #eef1f5;
  font-weight: 700;
}
.v3top .code {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--violet);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 999px;
  padding: 6px 14px;
  text-decoration: none;
  transition:
    background 0.15s var(--eo),
    border-color 0.15s var(--eo);
}
.v3top a.code:hover {
  background: rgba(167, 139, 250, 0.08);
  border-color: rgba(167, 139, 250, 0.5);
}
.v3loading {
  padding: 64px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  position: relative;
  overflow: hidden;
}
.v3loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(238, 178, 244, 0.06), transparent);
  transform: translateX(-100%);
  animation: v3shimmer 1.4s linear infinite;
}
@keyframes v3shimmer {
  to {
    transform: translateX(100%);
  }
}

/* ════ craft polish (UX audit fixes) ════ */
/* #1 — profile card fades in instead of popping from the loading text */
@keyframes v3CardIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#profileCard.v3-in {
  animation: v3CardIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) both;
}
/* #4 — press feedback across the profile body (audit: zero :active in the body) */
#profileCard [onclick] {
  transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}
#profileCard [onclick]:active {
  transform: scale(0.99);
}
#profileCard button:active,
.vr-reveal-btn:active {
  transform: scale(0.97);
}
@media (prefers-reduced-motion: reduce) {
  .v3loading::after {
    animation: none;
  }
  #profileCard.v3-in {
    animation: none;
  }
  #profileCard [onclick]:active,
  #profileCard button:active,
  .vr-reveal-btn:active {
    transform: none;
  }
}

/* ════ v3 restyle: bring renderVerifiedResume's output into the v3 design ════ */
#profileCard {
  color: #eef1f5;
}
/* hero */
#profileCard .vr-header {
  padding: 0 !important;
  margin-bottom: 30px !important;
  border-bottom: none !important;
  align-items: flex-start;
  gap: 32px;
}
#profileCard .vr-name {
  font-size: clamp(30px, 4.6vw, 44px) !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.05;
}
#profileCard .vr-role {
  font-size: 16px !important;
  color: var(--dim) !important;
  font-weight: 400 !important;
  margin-top: 8px !important;
}
#profileCard .vr-location {
  font-family: var(--mono) !important;
  font-size: 11px !important;
  color: var(--muted) !important;
  letter-spacing: 0.04em !important;
  margin-top: 6px;
}
/* exact mock .dial .tier */
#profileCard .vr-tier {
  font-family: var(--mono) !important;
  font-size: clamp(26px, 3.4vw, 38px) !important;
  font-weight: 700 !important;
  line-height: 1.04 !important;
  color: var(--green) !important;
  text-transform: uppercase;
  letter-spacing: 0.02em !important;
  filter: drop-shadow(0 0 14px rgba(52, 211, 153, 0.25));
}
#profileCard .vr-tier-label {
  color: var(--muted) !important;
}
/* stats bar (removed at runtime in full mode, styled defensively) */
#profileCard .vr-stats {
  padding: 18px 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  gap: 36px !important;
}
#profileCard .vr-stat-label {
  font-family: var(--mono) !important;
  font-size: 9px !important;
  letter-spacing: 0.14em !important;
  color: var(--muted) !important;
  text-transform: uppercase;
}
#profileCard .vr-stat-value {
  font-family: var(--mono) !important;
  font-size: 18px !important;
}
/* candidate summary — matches the career-timeline role box (font/size/spacing) */
.v3-summary-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.v3-summary {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  border-left: 2px solid rgba(167, 139, 250, 0.5);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 0 0 42px;
}
.v3-summary b {
  color: #eef1f5;
  font-weight: 700;
}
/* sections — mock .sec rhythm */
#profileCard .vr-section {
  margin-bottom: 42px !important;
  padding: 0 !important;
  border-bottom: none !important;
  max-width: none;
}
#profileCard .vr-section-title {
  font-family: var(--mono) !important;
  font-size: 10px !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase;
  color: var(--muted) !important;
  margin-bottom: 18px !important;
}
/* timeline */
#profileCard .vr-job {
  padding: 16px 0 !important;
}
#profileCard .vr-job-org {
  font-size: 20px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
}
#profileCard .vr-job-role {
  color: var(--dim) !important;
  font-size: 15px !important;
  opacity: 1 !important;
}
/* per-role verify badge collapsed to a green tick (detail via click/hover) */
#profileCard .vr-badge-verified {
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  line-height: 1;
}
#profileCard .vr-job-period {
  font-family: var(--mono) !important;
  color: var(--muted) !important;
}
#profileCard .vr-job-current {
  border-left-color: var(--violet) !important;
}
/* skill pills — declared = purple; verified = green (combined selector beats purple) */
#profileCard .vr-skill-tag {
  font-family: var(--mono) !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(167, 139, 250, 0.3) !important;
  color: #c4b5fd !important;
  font-size: 12px !important;
  padding: 8px 13px !important;
  border-radius: 9px !important;
  line-height: 1;
}
#profileCard .vr-skill-tag.vr-skill-verified {
  background: rgba(52, 211, 153, 0.07) !important;
  border: 1px solid rgba(52, 211, 153, 0.4) !important;
  color: var(--green) !important;
}
#profileCard .vr-skill-verified span {
  font-size: 10px !important;
  opacity: 0.6 !important;
}
#profileCard .vr-badge-verified {
  background: rgba(52, 211, 153, 0.1) !important;
  border-color: rgba(52, 211, 153, 0.3) !important;
  color: var(--green) !important;
}
#profileCard .vr-cert-name {
  font-weight: 600 !important;
}
/* evidence matrix */
.id-dot {
  width: 13px !important;
  height: 13px !important;
  border-radius: 3px !important;
}
.id-dot.on {
  background: #eeb2f4 !important;
  box-shadow: 0 0 8px rgba(238, 178, 244, 0.55) !important;
}
.id-dot.off {
  background: rgba(238, 178, 244, 0.05) !important;
  border: 1px solid rgba(238, 178, 244, 0.1) !important;
}
.id-grid {
  grid-template-columns: 118px repeat(14, 1fr) 112px !important;
}
.id-grid .f {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
}
.id-grid .h {
  font-size: 10px !important;
  letter-spacing: 0.1em !important;
}
.id-grid .tier {
  font-size: 11px !important;
}
.id-grid > div {
  padding: 10px 3px !important;
}
/* Role Match card (JD ⇄ candidate) — under the candidate summary, employer view */
.v3-jdmatch {
  margin-bottom: 42px;
}
.jdm-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border-left: 2px solid rgba(20, 184, 166, 0.5);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
}
.jdm-ring {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}
.jdm-ring svg {
  width: 72px;
  height: 72px;
  transform: rotate(-90deg);
}
.jdm-ring .jdm-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 4;
}
.jdm-ring .jdm-fg {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s var(--eo);
}
.jdm-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
}
.jdm-body {
  flex: 1;
  min-width: 0;
}
.jdm-verdict {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.jdm-sum {
  font-size: 13px;
  color: var(--dim);
  line-height: 1.5;
  margin-bottom: 12px;
}
.jdm-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.jdm-skill {
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 8px;
  line-height: 1;
}
.jdm-skill.jdm-hit {
  color: var(--green);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.35);
}
.jdm-skill.jdm-gap {
  color: var(--muted);
  background: rgba(160, 154, 168, 0.06);
  border: 1px solid rgba(160, 154, 168, 0.2);
}
/* salary estimate — bottom-right of the header, in line with the pills */
.v3-hdr-salary {
  text-align: right;
}
.v3-hdr-salary-l {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.v3-hdr-salary-v {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--teal);
}

/* ── defense-moat chip strip + receipts ── */
.v3-defchips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 0 0;
}
.v3-defchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}
.v3-defchip:hover {
  color: #eef1f5;
  border-color: rgba(238, 178, 244, 0.4);
}
.v3-defchip[aria-expanded='true'] {
  color: #eef1f5;
  border-color: rgba(238, 178, 244, 0.5);
  background: rgba(238, 178, 244, 0.07);
}
.v3-defchip .em {
  font-size: 12px;
  line-height: 1;
}
.v3-defchip[data-k='defense'],
.v3-defchip[data-k='ts_sci'] {
  color: var(--pink);
  border-color: rgba(238, 178, 244, 0.4);
  background: rgba(238, 178, 244, 0.06);
}
.v3-defchip-static {
  cursor: default;
  color: var(--dim);
}
.v3-defchip-static:hover {
  color: var(--dim);
  border-color: rgba(255, 255, 255, 0.12);
}
.v3-defreceipts {
  display: none;
  margin: 12px 0 0;
  border: 1px solid rgba(238, 178, 244, 0.25);
  border-radius: 12px;
  background: rgba(238, 178, 244, 0.03);
  overflow: hidden;
}
.v3-defreceipts.open {
  display: block;
}
.v3-defreceipts .rh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 12px 14px;
  border-bottom: 1px solid rgba(238, 178, 244, 0.15);
}
.v3-defreceipts .rx {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}
.v3-defreceipts .ri {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.v3-defreceipts .ri:last-child {
  border-bottom: none;
}
.v3-defreceipts .rs {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--violet);
  margin-bottom: 4px;
}
.v3-defreceipts .rd {
  font-size: 13px;
  color: #d8dde4;
  line-height: 1.5;
}
.v3-defreceipts .rc {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
}
.v3-defreceipts .rc.verified {
  color: var(--green);
  background: rgba(52, 211, 153, 0.12);
}
.v3-defreceipts .rc.corroborated {
  color: var(--teal);
  background: rgba(20, 184, 166, 0.12);
}
.v3-defreceipts .rc.self_declared {
  color: var(--dim);
  background: rgba(255, 255, 255, 0.05);
}
.v3-defreceipts .empty {
  padding: 14px;
  font-size: 12px;
  color: var(--dim);
  line-height: 1.5;
}

/* Actions zone — sticky bottom bar */
.v3-actionbar {
  position: fixed;
  left: var(--rail);
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 12px 0;
  background: rgba(10, 11, 14, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.v3-actionbar:empty {
  display: none;
}
.v3-actionbar-inner {
  width: 100%;
  max-width: 860px;
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 0 28px;
}
.v3-actbtn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--pink);
  background: rgba(238, 178, 244, 0.06);
  border: 1px solid rgba(238, 178, 244, 0.25);
  border-radius: 8px;
  padding: 9px 16px;
  cursor: pointer;
  transition:
    background 0.15s var(--eo),
    transform 0.15s var(--eo);
}
.v3-actbtn:hover {
  background: rgba(238, 178, 244, 0.12);
}
.v3-actbtn:active {
  transform: scale(0.97);
}
.v3-actbtn[disabled] {
  opacity: 0.5;
  cursor: default;
}
/* Generate Brief = pink (primary action) · Push to ATS = blue */
.v3-actbtn.v3-actbtn-ats {
  color: #7cc4ff;
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}
.v3-actbtn.v3-actbtn-ats:hover {
  background: rgba(59, 130, 246, 0.16);
}
.v3-contact-chips {
  display: none;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
/* Intel action button in the bar — teal accent, sized like the other actions */
.v3-actionbar .intel-i {
  width: auto !important;
  height: auto !important;
  min-width: 0;
  font-family: var(--mono) !important;
  font-size: 11px !important;
  font-style: normal !important;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #2dd4bf !important;
  background: rgba(20, 184, 166, 0.08) !important;
  border: 1px solid rgba(45, 212, 191, 0.3) !important;
  border-radius: 8px !important;
  padding: 9px 16px !important;
  gap: 6px;
  transition:
    background 0.15s var(--eo),
    transform 0.15s var(--eo);
}
.v3-actionbar .intel-i:hover {
  background: rgba(20, 184, 166, 0.16) !important;
}
.v3-actionbar .intel-i:active {
  transform: scale(0.97);
}

/* ── evidence matrix card: gradient top-bar + slow sheen sweep (mock .aidwrap) ── */
.v3-aidwrap {
  position: relative !important;
  border: 1px solid rgba(238, 178, 244, 0.1) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  overflow: hidden;
  margin-bottom: var(--s8) !important;
}
.v3-aidwrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 2;
  background: linear-gradient(
    90deg,
    transparent 4%,
    rgba(238, 178, 244, 0.5) 28%,
    rgba(167, 139, 250, 0.55) 50%,
    rgba(20, 184, 166, 0.5) 72%,
    transparent 96%
  );
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.4);
}
.v3-aidwrap::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 2px;
  z-index: 3;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  animation: v3sheen 5.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes v3sheen {
  0% {
    left: -40%;
  }
  55%,
  100% {
    left: 120%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .v3-aidwrap::after {
    display: none;
  }
}
