/* my-mbti.com 全站样式 */
:root {
  --bg: #fafafc;
  --card: #ffffff;
  --text: #1f2333;
  --text-2: #5a6072;
  --line: #e7e8ef;
  --brand: #5b5bd6;
  --brand-dark: #4747c2;
  --nt: #7c3aed; --nt-bg: #f3eeff;
  --nf: #059669; --nf-bg: #e9f9f2;
  --sj: #2563eb; --sj-bg: #eaf1fe;
  --sp: #ea580c; --sp-bg: #fef1e7;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(30, 34, 60, .06), 0 8px 24px rgba(30, 34, 60, .07);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.75; font-size: 16px;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.logo { font-weight: 800; font-size: 1.25rem; color: var(--text); letter-spacing: .5px; }
.logo span { color: var(--brand); }
.logo:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--text-2); font-size: .95rem; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { background: var(--bg); color: var(--text); text-decoration: none; }

/* hero */
.hero { padding: 72px 0 56px; text-align: center; background: linear-gradient(180deg, #f1f0fd 0%, var(--bg) 100%); }
.hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.9rem); line-height: 1.3; letter-spacing: .5px;
  background: linear-gradient(100deg, #3d3db8, #7c3aed 60%, #b04ddb); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 16px auto 0; max-width: 620px; color: var(--text-2); font-size: 1.1rem; }
.hero-cta { margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-meta { margin-top: 16px; color: var(--text-2); font-size: .88rem; }

/* buttons */
.btn { display: inline-block; padding: 10px 22px; border-radius: 999px; font-size: 1rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all .15s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(91, 91, 214, .35); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-lg { padding: 13px 30px; font-size: 1.06rem; }

/* sections */
.section { padding: 52px 0; }
.section-alt { background: #f4f4f9; }
.section h2 { font-size: 1.55rem; margin-bottom: 8px; }
.section-sub { color: var(--text-2); margin-bottom: 22px; max-width: 640px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feature h3 { margin-bottom: 8px; font-size: 1.08rem; }
.feature p { color: var(--text-2); font-size: .95rem; }
.how-list { padding-left: 1.3em; color: var(--text-2); max-width: 640px; }
.how-list li { margin: 8px 0; }

/* type cards */
.group-title { margin: 26px 0 12px; font-size: 1.12rem; }
.g-text-nt { color: var(--nt); } .g-text-nf { color: var(--nf); }
.g-text-sj { color: var(--sj); } .g-text-sp { color: var(--sp); }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.type-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow);
  border-top: 3px solid var(--line); transition: transform .15s ease; }
.type-card:hover { transform: translateY(-3px); text-decoration: none; }
.type-card.g-nt { border-top-color: var(--nt); } .type-card.g-nf { border-top-color: var(--nf); }
.type-card.g-sj { border-top-color: var(--sj); } .type-card.g-sp { border-top-color: var(--sp); }
.tc-code { font-weight: 800; font-size: 1.25rem; color: var(--text); letter-spacing: 1px; }
.tc-nick { color: var(--brand); font-weight: 600; font-size: .95rem; }
.g-nt .tc-nick { color: var(--nt); } .g-nf .tc-nick { color: var(--nf); }
.g-sj .tc-nick { color: var(--sj); } .g-sp .tc-nick { color: var(--sp); }
.tc-tag { color: var(--text-2); font-size: .86rem; line-height: 1.5; }

/* article pages */
.article { max-width: 780px; padding-top: 34px; padding-bottom: 60px; }
.article section { margin-top: 36px; }
.article h2 { font-size: 1.45rem; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.article h3 { font-size: 1.08rem; margin: 18px 0 8px; }
.article p { margin: 10px 0; color: #333a4d; }
.crumbs { font-size: .86rem; color: var(--text-2); margin-bottom: 18px; }
.crumbs a { color: var(--text-2); }

.type-hero { border-radius: var(--radius); padding: 30px 28px; background: var(--card);
  border: 1px solid var(--line); border-left: 6px solid var(--brand); box-shadow: var(--shadow); }
.type-hero.g-nt { border-left-color: var(--nt); background: var(--nt-bg); }
.type-hero.g-nf { border-left-color: var(--nf); background: var(--nf-bg); }
.type-hero.g-sj { border-left-color: var(--sj); background: var(--sj-bg); }
.type-hero.g-sp { border-left-color: var(--sp); background: var(--sp-bg); }
.th-group { font-size: .85rem; font-weight: 700; color: var(--text-2); letter-spacing: 1px; }
.type-hero h1 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin: 6px 0; line-height: 1.35; }
.th-tag { color: var(--text-2); font-size: 1.02rem; }

.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.pt-item { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--card); }
.pt-item h3 { margin: 0 0 4px; }
.pt-item p { margin: 0; font-size: .93rem; color: var(--text-2); }
.pt-pro { border-left: 4px solid #16a34a; }
.pt-con { border-left: 4px solid #dc2626; }

.fn-list { padding-left: 1.4em; }
.fn-list li { margin: 12px 0; }
.fn-list p { margin: 2px 0 0; font-size: .94rem; color: var(--text-2); }

.job-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 12px; }
.job { border: 1px solid var(--line); border-radius: 10px; padding: 13px 16px; background: var(--card); }
.job h3 { margin: 0 0 3px; font-size: 1rem; }
.job p { margin: 0; font-size: .92rem; color: var(--text-2); }
.plain-list, .tip-list { padding-left: 1.3em; }
.plain-list li, .tip-list li { margin: 8px 0; color: #333a4d; }
.tip-pro li::marker { color: #16a34a; }
.tip-con li::marker { color: #dc2626; }

.faq-item { border: 1px solid var(--line); border-radius: 10px; background: var(--card); margin: 10px 0; padding: 0; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 13px 16px; list-style-position: inside; }
.faq-item p { padding: 0 16px 14px; margin: 0; color: var(--text-2); }

.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 6px 14px; font-size: .88rem; color: var(--text); }
.chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

.cta-band { margin-top: 40px; background: linear-gradient(100deg, #ecebfc, #f5edfc); border-radius: var(--radius);
  padding: 22px 26px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cta-band p { font-weight: 600; font-size: 1.05rem; margin: 0; }

/* pair pages */
.pair-hero { text-align: center; margin-bottom: 10px; }
.pair-badges { display: flex; justify-content: center; align-items: center; gap: 14px; margin-bottom: 14px; }
.pair-badge { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 20px; font-weight: 800; font-size: 1.2rem; color: var(--text); box-shadow: var(--shadow); }
.pair-badge small { font-weight: 500; font-size: .8rem; color: var(--text-2); }
.pair-badge:hover { text-decoration: none; transform: translateY(-2px); }
.pair-badge.g-nt { border-top: 3px solid var(--nt); } .pair-badge.g-nf { border-top: 3px solid var(--nf); }
.pair-badge.g-sj { border-top: 3px solid var(--sj); } .pair-badge.g-sp { border-top: 3px solid var(--sp); }
.matcher-x { color: var(--text-2); font-size: 1.3rem; }
.pair-hero h1 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); }
.score-card { max-width: 460px; margin: 18px auto 0; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); text-align: left; }
.score-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.score-label { width: 4.6em; font-size: .92rem; color: var(--text-2); }
.score-dots { letter-spacing: 3px; color: var(--brand); flex: 1; }
.score-num { font-size: .88rem; color: var(--text-2); }

/* matcher + matrix */
.matcher { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 34px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.matcher select { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 1rem; background: #fff; color: var(--text); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.matrix { border-collapse: collapse; font-size: .82rem; min-width: 760px; width: 100%; }
.matrix th, .matrix td { border: 1px solid var(--line); padding: 5px 7px; text-align: center; }
.matrix thead th { background: #f4f4f9; position: sticky; top: 0; }
.matrix tbody th { background: #f4f4f9; }
.matrix a { display: block; }

/* quiz */
.quiz-wrap { max-width: 640px; text-align: center; }
.quiz-tips { text-align: left; max-width: 420px; margin: 0 auto 26px; color: var(--text-2); padding-left: 1.3em; }
.quiz-tips li { margin: 6px 0; }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 10px 0 26px; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), #9d6be8); transition: width .2s ease; }
.qnum { color: var(--text-2); font-size: .9rem; }
.qtext { font-size: 1.3rem; margin: 12px 0 28px; min-height: 3.2em; line-height: 1.6; }
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 26px; }
.likert button { padding: 12px 6px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card);
  cursor: pointer; font-size: .88rem; color: var(--text); transition: all .12s ease; font-family: inherit; }
.likert button:hover { border-color: var(--brand); color: var(--brand); }
.likert button[data-v="-2"]:hover, .likert button[data-v="-1"]:hover { border-color: #dc2626; color: #dc2626; }
.likert button[data-v="2"]:hover, .likert button[data-v="1"]:hover { border-color: #16a34a; color: #16a34a; }

/* result */
.result-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); }
.result-code { font-size: 3rem; font-weight: 800; letter-spacing: 4px; }
.result-nick { font-size: 1.2rem; color: var(--brand); font-weight: 600; }
.dim-bars { margin: 26px 0; text-align: left; }
.dim-row { margin: 14px 0; }
.dim-labels { display: flex; justify-content: space-between; font-size: .88rem; color: var(--text-2); margin-bottom: 4px; }
.dim-track { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.dim-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), #9d6be8); }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 34px 0; margin-top: 30px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.footer-links a { color: var(--text-2); font-size: .92rem; }
.disclaimer { color: #9aa0b0; font-size: .82rem; max-width: 720px; }
.copyright { color: #9aa0b0; font-size: .82rem; margin-top: 6px; }

@media (max-width: 560px) {
  .likert { grid-template-columns: 1fr; }
  .likert button { padding: 10px; }
  .header-inner { height: auto; padding: 10px 0; flex-direction: column; }
  .hero { padding: 46px 0 40px; }
}
