/* 16personalities.uz — asl sayt uslubiga yaqin stil */
:root {
  --green: #33a474;
  --green-dark: #2b8a62;
  --purple: #88619a;
  --blue: #4298b4;
  --yellow: #e4ae3a;
  --red: #f25e62;
  --navy: #576071;
  --text: #343c4b;
  --gray-12: #6f7887;
  --gray-6: #a5adba;
  --line: #dddfe2;
  --bg: #f9f9f9;
  --card: #fff;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: "Red Hat Display", var(--font-body);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 800; margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* Navbar */
.navbar {
  background: #fff;
  border-bottom: 1px solid #eeeff1;
  position: sticky; top: 0; z-index: 20;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-title); font-weight: 800; font-size: 1.15rem; }
.brand .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 1.1rem; }
.brand span b { color: var(--green); }
.nav-links { display: flex; gap: 22px; font-weight: 600; font-size: .95rem; }
.nav-links a { padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-links a.active, .nav-links a:hover { border-bottom-color: var(--green); }
@media (max-width: 640px) { .nav-links { display: none; } }

/* Header (yashil) */
main.q-pt header {
  background: var(--green); color: #fff; text-align: center; padding: 28px 16px 20px;
}
main.q-pt header h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 8px; }
main.q-pt header .trademark { opacity: .95; font-size: 1.05rem; }

/* Maslahatlar (tips) */
.tips { background: var(--green); padding: 8px 16px 30px; position: relative; }
.tips .row { display: flex; flex-direction: column; gap: 10px; max-width: 1100px; margin: 0 auto; }
.tip { background: rgba(255,255,255,.85); border-radius: 12px; padding: 14px; display: flex; align-items: center; gap: 14px; }
.tip .ico { flex: none; width: 44px; height: 44px; min-width: 44px; min-height: 44px; border-radius: 50%; display: grid; place-items: center; }
.tip .ico svg { width: 26px; height: 26px; }
.tip .ico.first { background: var(--blue); } .tip .ico.second { background: var(--yellow); } .tip .ico.third { background: #583f64; }
.tip .title { font-family: var(--font-title); font-weight: 800; font-size: 1.05rem; margin-bottom: 3px; }
.tip .subtitle { font-size: .9rem; color: var(--gray-12); }
@media (min-width: 768px) {
  .tips { padding: 20px 16px 40px; clip-path: polygon(0 0,100% 0,100% 100%,70% calc(100% - 15px),25% 100%,0 calc(100% - 10px)); }
  .tips .row { flex-direction: row; align-items: stretch; }
  .tip { flex: 1; flex-direction: column; text-align: center; padding: 26px 20px; background: #fff; }
  .tip .ico { width: 72px; height: 72px; min-width: 72px; min-height: 72px; } .tip .ico svg { width: 40px; height: 40px; }
}

/* Progress */
.progress-wrapper {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 11;
  background: var(--navy); padding: 14px 16px; display: flex; align-items: center; justify-content: center; gap: 14px;
}
.progress-wrapper .percentage { color: #fff; font-size: .85rem; min-width: 34px; text-align: right; }
.progress-bar { flex: 1; max-width: 1000px; height: 4px; border-radius: 10px; background: #fff; position: relative; overflow: hidden; }
.progress-bar .filler { position: absolute; inset: 0 auto 0 0; background: var(--green); width: 0; transition: width .25s ease; }
@media (min-width: 992px) {
  .progress-wrapper { position: relative; background: var(--bg); padding: 28px 16px; }
  .progress-wrapper .percentage { color: var(--gray-12); font-size: 1.15rem; }
  .progress-bar { flex: 0 0 60%; height: 5px; background: #ddd; }
}

/* Savollar */
.quiz-wrapper { min-height: 600px; padding-bottom: 20px; }
.question {
  max-width: 900px; margin: 0 auto; padding: 44px 16px 36px;
  border-bottom: 1px solid var(--line); text-align: center;
  transition: opacity .3s ease;
}
.question.is--answered { opacity: .45; }
.question.is--answered:hover, .question.is--answered:focus-within { opacity: 1; }
.question.is--error .statement { color: var(--red); }
.question .statement { font-size: 1.3rem; font-weight: 600; line-height: 1.45; margin: 0 auto 26px; max-width: 760px; }
@media (min-width: 768px) { .question .statement { font-size: 1.5rem; } }

.scale { display: flex; align-items: center; justify-content: center; gap: 10px; }
.scale .label { font-weight: 700; font-size: 1.05rem; display: none; }
.scale .label.agree { color: var(--green); }
.scale .label.disagree { color: var(--purple); }
.scale .options { display: flex; align-items: center; gap: 10px; }
.opt {
  --size: 32px; --c: var(--gray-6);
  width: var(--size); height: var(--size); border-radius: 50%;
  border: 2px solid var(--c); background: #fff; padding: 0; position: relative;
  transition: transform .15s ease, background .15s ease;
}
.opt:hover { transform: scale(1.08); }
.opt.v3, .opt.v-3 { --size: 50px; }
.opt.v2, .opt.v-2 { --size: 42px; }
.opt.v1, .opt.v-1 { --size: 34px; }
.opt.v0 { --size: 28px; }
.opt.v3, .opt.v2, .opt.v1 { --c: var(--green); }
.opt.v-3, .opt.v-2, .opt.v-1 { --c: var(--purple); }
.opt.selected { background: var(--c); }
.opt.selected::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 38%; height: 20%; border-left: 3px solid #fff; border-bottom: 3px solid #fff;
  transform: translateY(-20%) rotate(-45deg);
}
.opt:focus-visible { outline: 3px solid rgba(66,152,180,.5); outline-offset: 2px; }
.scale-mobile-labels { display: flex; justify-content: space-between; max-width: 340px; margin: 14px auto 0; font-weight: 700; }
.scale-mobile-labels .agree { color: var(--green); } .scale-mobile-labels .disagree { color: var(--purple); }
@media (min-width: 640px) {
  .scale { gap: 18px; }
  .scale .label { display: inline; }
  .scale .options { gap: 14px; }
  .opt.v3, .opt.v-3 { --size: 56px; }
  .opt.v2, .opt.v-2 { --size: 46px; }
  .opt.v1, .opt.v-1 { --size: 38px; }
  .opt.v0 { --size: 30px; }
  .scale-mobile-labels { display: none; }
}
@media (max-width: 400px) {
  .scale .options { gap: 7px; }
  .opt.v3, .opt.v-3 { --size: 44px; } .opt.v2, .opt.v-2 { --size: 38px; } .opt.v1, .opt.v-1 { --size: 32px; } .opt.v0 { --size: 26px; }
}

/* Jins */
.gender { margin: 24px auto; max-width: 460px; padding: 0 16px; text-align: center; }
.gender .input__label { font-weight: 600; font-size: 1.2rem; margin-bottom: 6px; }
.gender .input__label span { color: var(--gray-12); }
.gender .input__note { color: var(--gray-12); font-size: .95rem; margin: 0 0 16px; }
.gender select {
  width: 100%; max-width: 320px; padding: 12px 40px 12px 16px; font: inherit; font-weight: 600; color: var(--text);
  border: 2px solid var(--line); border-radius: 12px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23576071' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
  appearance: none;
}

/* Tugmalar */
.action-row { display: flex; justify-content: center; padding: 16px 16px 100px; max-width: 870px; margin: 0 auto; border-bottom: 1px solid var(--line); }
.sp-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; max-width: 340px; padding: 16px 28px; border: 0; border-radius: 999px;
  background: var(--green); color: #fff; font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 6px 16px rgba(51,164,116,.35); transition: background .15s, transform .15s;
}
.sp-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.sp-button.secondary { background: #fff; color: var(--text); border: 2px solid var(--line); box-shadow: none; }
.sp-button svg { width: 18px; height: 18px; }
@media (min-width: 992px) { .action-row { padding-bottom: 60px; } }

.error-note { color: var(--red); text-align: center; font-weight: 600; margin: 8px 0 0; display: none; }
.error-note.show { display: block; }

/* Footer */
footer { padding: 30px 16px 40px; text-align: center; color: var(--gray-12); font-size: .85rem; }
footer a { text-decoration: underline; }

/* ---------- Natija sahifasi ---------- */
.result-hero { color: #fff; padding: 40px 16px 60px; text-align: center; }
.result-hero .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .8rem; opacity: .9; }
.result-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 8px 0 4px; }
.result-hero .code { font-size: 1.35rem; font-weight: 700; opacity: .95; }
.result-hero .tagline { max-width: 640px; margin: 14px auto 0; font-size: 1.1rem; opacity: .95; }
.result-hero .avatar {
  width: 130px; height: 130px; border-radius: 50%; margin: 0 auto 16px;
  background: rgba(255,255,255,.2); display: grid; place-items: center;
  font-family: var(--font-title); font-weight: 800; font-size: 2.2rem; border: 4px solid rgba(255,255,255,.55);
}
.result-body { max-width: 900px; margin: -30px auto 0; padding: 0 16px 40px; }
.card { background: var(--card); border-radius: 16px; box-shadow: 0 8px 30px rgba(52,60,75,.08); padding: 24px; margin-bottom: 20px; }
.card h2 { font-size: 1.35rem; margin-bottom: 14px; }
.card p { margin: 0 0 10px; color: #4b5563; }
.trait { padding: 14px 0; border-bottom: 1px solid #eeeff1; }
.trait:last-child { border-bottom: 0; }
.trait .head { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.trait .head .pct { color: var(--tc); }
.trait .head .lbl { color: var(--gray-12); font-weight: 600; font-size: .85rem; }
.trait .bar { height: 10px; border-radius: 10px; background: #eeeff1; position: relative; overflow: hidden; }
.trait .bar .fill { position: absolute; top: 0; bottom: 0; background: var(--tc); border-radius: 10px; transition: width .8s ease; }
.trait .poles { display: flex; justify-content: space-between; font-size: .85rem; color: var(--gray-12); margin-top: 6px; }
.trait .poles .win { color: var(--tc); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .9rem; background: #eef2f6; }
.chip.good { background: #e8f5ee; color: var(--green-dark); }
.chip.bad { background: #fdecec; color: #c8383b; }
.two { display: grid; gap: 20px; }
@media (min-width: 700px) { .two { grid-template-columns: 1fr 1fr; } }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 10px; }
.result-actions .sp-button { width: auto; }

/* ---------- Turlar sahifasi ---------- */
.types-hero { background: var(--green); color: #fff; padding: 36px 16px; text-align: center; }
.types-hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.group-section { padding: 30px 0 10px; }
.group-section h2 { font-size: 1.5rem; margin-bottom: 4px; }
.group-section .gdesc { color: var(--gray-12); margin: 0 0 16px; }
.type-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-bottom: 20px; }
.type-card { background: #fff; border-radius: 14px; padding: 20px; border-top: 5px solid var(--gc); box-shadow: 0 6px 20px rgba(52,60,75,.06); }
.type-card .code { color: var(--gc); font-weight: 800; font-family: var(--font-title); font-size: .95rem; }
.type-card h3 { font-size: 1.2rem; margin: 4px 0 6px; }
.type-card p { margin: 0; color: var(--gray-12); font-size: .9rem; }
