/* Modern visual layer — intentionally additive to preserve the legacy page structure and behavior. */
:root {
  color-scheme: light;
  --mbti-ink: #17243b;
  --mbti-muted: #64748b;
  --mbti-line: rgba(148, 163, 184, .22);
  --mbti-primary: #635bdb;
  --mbti-primary-dark: #4f46c8;
  --mbti-surface: rgba(255,255,255,.88);
  --mbti-shadow: 0 20px 60px rgba(35, 48, 85, .10);
}
html { min-height: 100%; scroll-behavior: auto; }
body {
  min-height: 100vh;
  margin: 0;
  padding-top: 70px;
  color: var(--mbti-ink);
  background:
    radial-gradient(ellipse at 12% 8%, rgba(191, 196, 255, .38), transparent 34%),
    radial-gradient(ellipse at 88% 20%, rgba(188, 232, 225, .38), transparent 32%),
    linear-gradient(180deg, #f7f8ff 0%, #f6f8fc 55%, #eef2f8 100%);
  background-attachment: scroll;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}
a { transition: color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.navbar.navbar-default {
  min-height: 68px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid rgba(226,232,240,.85);
  border-radius: 0;
  background: rgba(255,255,255,.88);
  box-shadow: 0 8px 28px rgba(31,41,72,.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.navbar-fixed-top { position: fixed; top: 0; right: 0; left: 0; z-index: 1030; }
.navbar-default .container { display:flex; align-items:center; min-height:68px; }
.navbar-default .navbar-brand {
  height: auto;
  padding: 21px 24px 21px 15px;
  color: var(--mbti-primary);
  font-size: 23px;
  font-weight: 850;
  letter-spacing: -.06em;
}
.navbar-default .navbar-nav>li>a {
  padding: 24px 15px;
  color: #526078;
  font-size: 13px;
  font-weight: 650;
  transition: color .2s ease;
}
.navbar-default .navbar-nav>li>a:hover,
.navbar-default .navbar-nav>li>a:focus { color: var(--mbti-primary); background: transparent; }
.navbar-default .navbar-toggle { margin-top: 16px; border-color: #e2e8f0; }
.navbar-default .navbar-toggle .icon-bar { background: #64748b; }
/* Compact language switcher: visually distinct from navigation links, but aligned to the same baseline. */
.navbar-collapse > .language-menu {
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 0 16px;
  padding:0 0 0 16px;
  border-left:1px solid #edf0f5;
}
.navbar-collapse > .language-menu > li {
  display:flex;
  align-items:center;
  min-height:68px;
}
#language-label {
  display:flex;
  align-items:center;
  margin:0 !important;
  padding:0;
  color:#8993a6;
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  line-height:1;
}
#language-selector {
  display:block;
  width:124px;
  height:38px;
  margin:0 !important;
  padding:0 34px 0 13px;
  appearance:none;
  -webkit-appearance:none;
  border:1px solid #e7eaf2;
  border-radius:12px;
  outline:0;
  background-color:rgba(248,249,253,.95);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23717d92' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  color:#344158;
  font-family:inherit;
  font-size:12px;
  font-weight:650;
  line-height:36px;
  box-shadow:0 2px 7px rgba(31,41,72,.035);
  cursor:pointer;
  transition:border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
#language-selector:hover { border-color:#c9c7f2; background-color:#fff; }
#language-selector:focus { border-color:#8b85e8; background-color:#fff; box-shadow:0 0 0 3px rgba(99,91,219,.12); }
.container { max-width: 1120px; width: calc(100% - 40px); }
.page-header { margin: 38px 0 26px; padding: 42px 24px 34px; border: 1px solid rgba(255,255,255,.8); border-radius: 28px; background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(245,246,255,.78)); box-shadow: var(--mbti-shadow); text-align: center; }
.page-header .content { display:block; font-size: inherit; font-weight: 800; }
.page-header .content::before { content:"DISCOVER YOURSELF"; display:block; color:var(--mbti-primary); font-size:clamp(12px,1.3vw,14px); letter-spacing:.24em; }
.page-header .content::after { content:"认识自己，从一次探索开始"; display:block; margin-top:10px; color:var(--mbti-muted); font-size:clamp(14px,2vw,17px); font-weight:500; letter-spacing:.02em; }
.page-header svg { display:none; }
.bs-docs-section { margin: 0 auto 26px; padding: 28px 34px; border:1px solid rgba(255,255,255,.8); border-radius:24px; background:var(--mbti-surface); box-shadow:var(--mbti-shadow); }
.bs-docs-section h2 { margin:0 0 18px; color:var(--mbti-ink); font-size:21px; font-weight:800; }
.bs-docs-section p { margin:0 0 11px; color:#58677e; font-size:14px; line-height:1.85; }
.bs-docs-section p:last-child { margin-bottom:0; color:var(--mbti-primary-dark); font-weight:700; }
.btn-group-3 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:0 auto 42px; padding:0; }
.a-btn {
  display:flex; width:auto; height:auto; min-height:112px; margin:0; padding:22px 24px;
  flex-direction:column; align-items:flex-start; justify-content:center; gap:7px;
  border:1px solid rgba(255,255,255,.9); border-radius:22px;
  background:linear-gradient(135deg,#6f68e8,#5650ca); box-shadow:0 14px 30px rgba(89,82,205,.2);
}
.a-btn:nth-child(2) { background:linear-gradient(135deg,#20a99b,#16877f); box-shadow:0 14px 30px rgba(32,169,155,.18); }
.a-btn:nth-child(3) { background:linear-gradient(135deg,#ed9d56,#d77b43); box-shadow:0 14px 30px rgba(215,123,67,.18); }
.a-btn span { width:auto; height:auto; color:white; text-shadow:none; font-family:inherit; font-size:23px; font-weight:800; align-items:flex-start; }
.a-btn span:nth-child(1) { display:none; }
.a-btn span:nth-child(2) { opacity:1; transform:none; }
.a-btn span:nth-child(3) { position:static; opacity:1; margin:0; font-size:12px; font-weight:600; letter-spacing:.12em; text-transform:uppercase; }
.a-btn:hover { transform:translateY(-4px); background:linear-gradient(135deg,#5d56d7,#4c45bb); box-shadow:0 20px 34px rgba(89,82,205,.25); }
.a-btn:nth-child(2):hover { background:linear-gradient(135deg,#15998d,#11766f); }
.a-btn:nth-child(3):hover { background:linear-gradient(135deg,#df8b48,#c66b37); }
footer { margin:30px 0 0; color:#8994a7 !important; font-size:12px !important; }
footer a { color:#8994a7 !important; }
body.test-page { overflow-x:hidden; }
.test-page .navbar { margin-bottom:0 !important; }
.test-page .questionbox { min-height:calc(100vh - 100px); align-items:flex-start; padding:48px 0 64px; }
.test-page .flexWidth { width:100%; max-width:760px; margin:0 auto; }
.test-page .ac-custom { width:100%; margin:0; padding:34px 38px; border:1px solid rgba(255,255,255,.88); border-radius:28px; background:var(--mbti-surface); box-shadow:var(--mbti-shadow); }
.test-page .ac-custom fieldset { border:0; margin:0; padding:0; }
.test-page .ac-custom legend { display:block; width:100%; margin:0 0 28px; padding:0 0 20px; border:0; border-bottom:1px solid var(--mbti-line); color:var(--mbti-ink); font-size:clamp(20px,3vw,27px); font-weight:800; line-height:1.55; white-space:normal; }
.test-page .ac-custom ul { margin:0; padding:0; list-style:none; }
.test-page .ac-custom li { position:relative; margin:12px 0; padding:0; border:1px solid #e6eaf2; border-radius:16px; background:#fff; transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.test-page .ac-custom li:hover { transform:translateY(-2px); border-color:#b8b5f4; box-shadow:0 8px 20px rgba(74,78,145,.08); }
.test-page .ac-custom li label { display:block; min-height:58px; margin:0; padding:17px 20px 17px 54px; color:#475569; font-size:15px; font-weight:600; line-height:1.65; cursor:pointer; }
.test-page .ac-custom li input { left:18px; top:19px; }
.test-page .ac-custom li svg { pointer-events:none; }
.types-page { padding-top:0; }
.types-page .navbar { margin-bottom:0; }
.types-page .page { max-width:1120px; margin:0 auto; padding:40px 20px 64px; }
.types-hero { max-width:1120px; margin:38px auto 0; padding:34px 20px 0; text-align:center; }
.types-hero .eyebrow { margin:0 0 8px; color:var(--mbti-primary); font-size:12px; font-weight:800; letter-spacing:.22em; }
.types-hero h1 { margin:0; color:var(--mbti-ink); font-size:clamp(28px,4vw,42px); font-weight:850; letter-spacing:-.04em; }
.types-hero p { margin:10px 0 0; color:var(--mbti-muted); font-size:15px; }
.types-page .page::before,.types-page .page::after { content:none; }
.types-page .group { margin:0 0 20px; padding:26px; overflow:visible; border:1px solid rgba(255,255,255,.8); border-radius:24px; background:rgba(255,255,255,.78); box-shadow:var(--mbti-shadow); }
.types-page .group::before { display:none !important; }
.types-page .group h2 { position:static; transform:none; margin:0 0 20px; color:var(--mbti-ink); font-size:19px; letter-spacing:0; text-align:left; }
.types-page .card-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:0; }
.types-page .card-grid>a { display:block; min-width:0; padding:16px 12px; border:1px solid #edf0f6; border-radius:18px; background:#fff; text-decoration:none; }
.types-page .type-card { height:100%; }
.types-page .type-card:hover { transform:translateY(-4px); }
.types-page .avatar-image { width:clamp(92px,9vw,132px); height:clamp(92px,9vw,132px); }
.types-page .type-card h3 { margin-top:6px; color:var(--mbti-ink); font-size:18px; }
.types-page .type-card .type-code { color:var(--mbti-primary); font-size:13px; letter-spacing:.1em; }
.types-page .type-card p { color:var(--mbti-muted); font-size:12px; }
.detail-page { padding-top:0; }
.detail-page .container { max-width:900px; }
.detail-page .intro-effect-jam3.article { min-height:calc(100vh - 68px); height:auto; margin:0; padding:0 0 60px; border:1px solid rgba(255,255,255,.8); border-radius:28px; overflow:hidden; background:rgba(255,255,255,.9); box-shadow:var(--mbti-shadow); }
.detail-page .header { min-height:310px; height:310px; background:radial-gradient(circle at 20% 20%,rgba(255,255,255,.28),transparent 28%),linear-gradient(135deg,#625bd8,#7b72e8 55%,#4d9d9a); }
.detail-page .title h1 { color:#fff; font-size:clamp(42px,7vw,68px); letter-spacing:.04em; }
.detail-page .title p, .detail-page .title p.subline { color:rgba(255,255,255,.9); font-size:16px; line-height:1.6; }
.detail-page .content { padding:36px clamp(20px,6vw,64px) 70px !important; color:#526176; font-size:15px; line-height:1.9; }
.detail-page .content h2,.detail-page .content h3 { margin:30px 0 12px; color:var(--mbti-ink); font-weight:800; }
.detail-page .content p { color:#526176; font-size:15px; line-height:1.9; }
.detail-page .content ul { padding-left:1.4em; }
.detail-page button.trigger { display:none; position:relative; bottom:auto; left:50%; margin: -28px 0 0 -28px; width:56px; height:56px; border:4px solid white; border-radius:50%; background:var(--mbti-primary); box-shadow:0 8px 22px rgba(60,58,150,.25); }
.detail-page button.trigger::before { display:none; }
@media (max-width: 767px) {
  body { padding-top:60px; }
  .navbar.navbar-default { min-height:60px; }
  .navbar-default .container { display:block; min-height:60px; width:100%; }
  .navbar-default .navbar-brand { padding:18px 15px; }
  .navbar-default .navbar-toggle { margin-top:13px; }
  .navbar-default .navbar-collapse { border:0; background:rgba(255,255,255,.97); box-shadow:0 12px 20px rgba(31,41,72,.06); }
  .navbar-default .navbar-nav>li>a { padding:12px 18px; }
  .navbar-default .navbar-nav { margin:0 -15px; }
  .navbar-collapse > .language-menu {
    justify-content:flex-start;
    gap:12px;
    margin:8px 18px 14px;
    padding:12px 0 0;
    border-top:1px solid #edf0f5;
    border-left:0;
  }
  .navbar-collapse > .language-menu > li { min-height:38px; }
  #language-label { font-size:11px; }
  #language-selector { width:136px; }
  .container { width:calc(100% - 28px); }
  .page-header { margin:22px 0 16px; padding:34px 16px 28px; border-radius:22px; }
  .bs-docs-section { padding:22px 20px; border-radius:20px; }
  .bs-docs-section p { font-size:13px; }
  .btn-group-3 { grid-template-columns:1fr; gap:12px; margin-bottom:28px; }
  .a-btn { min-height:88px; padding:16px 20px; border-radius:18px; }
  .test-page .questionbox { min-height:auto; padding:26px 0 40px; }
  .test-page .ac-custom { padding:24px 18px; border-radius:22px; }
  .test-page .ac-custom legend { margin-bottom:20px; font-size:20px; }
  .test-page .ac-custom li label { padding:15px 14px 15px 48px; font-size:14px; }
  .test-page .ac-custom li input { left:14px; }
  .types-page .page { padding:26px 0 40px; }
  .types-hero { margin-top:24px; padding:20px 14px 0; }
  .types-page .group { padding:20px 14px; border-radius:20px; }
  .types-page .card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .types-page .card-grid>a { padding:12px 8px; }
  .types-page .avatar-image { width:100px; height:100px; }
  .types-page .type-card h3 { font-size:16px; }
  .types-page .type-card p { font-size:11px; }
  .detail-page .intro-effect-jam3.article { border-radius:20px; }
  .detail-page .header { min-height:250px; height:250px; }
  .detail-page .content { padding:26px 20px 50px !important; }
}
@media (max-width: 380px) {
  .types-page .card-grid { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
.test-progress { margin:0 0 18px; padding:18px 22px; border:1px solid rgba(255,255,255,.88); border-radius:18px; background:rgba(255,255,255,.82); box-shadow:0 10px 28px rgba(35,48,85,.06); }
.test-progress-meta { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; color:var(--mbti-muted); font-size:12px; font-weight:700; }
.test-progress-label { color:var(--mbti-primary); letter-spacing:.12em; }
.test-progress-track { height:7px; overflow:hidden; border-radius:999px; background:#e9eaf5; }
.test-progress-value { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#7169e8,#28a99b); transition:width .3s ease; }
.test-actions { display:flex; justify-content:space-between; gap:12px; margin-top:16px; }
.test-actions button { min-height:42px; padding:9px 17px; border:1px solid #e1e6f0; border-radius:12px; background:#fff; color:#526078; font-size:13px; font-weight:700; cursor:pointer; transition:all .2s ease; }
.test-actions button:hover:not(:disabled) { border-color:#b8b5f4; color:var(--mbti-primary); transform:translateY(-1px); }
.test-actions button:disabled { opacity:.42; cursor:not-allowed; }
.test-actions .test-restart { margin-left:auto; background:#f5f6fb; }
.test-load-error { padding:24px; border-radius:16px; background:#fff; color:#b42318; text-align:center; }
@media (max-width:767px) {
  .test-progress { padding:15px 16px; border-radius:16px; }
  .test-actions button { min-height:40px; padding:8px 13px; }
}


/* Branded restart confirmation dialog */
.test-dialog-backdrop {
  position:fixed;
  inset:0;
  z-index:2000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
  background:rgba(24,32,54,.42);
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
  animation:test-dialog-fade .18s ease-out;
}
.test-dialog {
  width:min(100%,420px);
  padding:34px 32px 28px;
  border:1px solid rgba(255,255,255,.9);
  border-radius:26px;
  background:linear-gradient(145deg,#fff 0%,#fafaff 100%);
  box-shadow:0 28px 80px rgba(25,34,70,.22);
  text-align:center;
  animation:test-dialog-rise .22s cubic-bezier(.2,.8,.2,1);
}
.test-dialog-icon {
  display:flex;
  width:58px;
  height:58px;
  align-items:center;
  justify-content:center;
  margin:0 auto 18px;
  border-radius:19px;
  background:linear-gradient(145deg,#f0efff,#e8f4f5);
}
.test-dialog-icon span {
  position:relative;
  display:block;
  width:23px;
  height:23px;
  border:2px solid #7069db;
  border-right-color:transparent;
  border-radius:50%;
}
.test-dialog-icon span::after {
  position:absolute;
  top:-4px;
  right:-3px;
  width:8px;
  height:8px;
  border-top:2px solid #7069db;
  border-right:2px solid #7069db;
  content:"";
}
.test-dialog-eyebrow {
  margin:0 0 7px;
  color:#7771d8;
  font-size:10px;
  font-weight:800;
  letter-spacing:.2em;
}
.test-dialog h2 {
  margin:0 0 10px;
  color:#202b43;
  font-size:23px;
  font-weight:850;
  letter-spacing:-.035em;
}
.test-dialog #test-dialog-description {
  max-width:310px;
  margin:0 auto;
  color:#748096;
  font-size:13px;
  line-height:1.8;
}
.test-dialog-actions {
  display:flex;
  justify-content:center;
  gap:10px;
  margin-top:27px;
}
.test-dialog-actions button {
  min-height:44px;
  padding:0 19px;
  border:1px solid #e6e9f1;
  border-radius:13px;
  background:#fff;
  color:#59667d;
  font-family:inherit;
  font-size:13px;
  font-weight:750;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.test-dialog-actions button:hover { transform:translateY(-1px); box-shadow:0 7px 16px rgba(40,48,90,.08); }
.test-dialog-actions .test-dialog-confirm {
  border-color:transparent;
  background:linear-gradient(135deg,#6d66df,#5650c7);
  color:#fff;
  box-shadow:0 7px 16px rgba(89,82,205,.2);
}
.test-dialog-actions .test-dialog-confirm:hover { background:linear-gradient(135deg,#5f58d1,#4d46bb); }
.test-dialog-actions button:focus-visible { outline:3px solid rgba(99,91,219,.25); outline-offset:3px; }
@keyframes test-dialog-fade { from { opacity:0; } to { opacity:1; } }
@keyframes test-dialog-rise { from { opacity:0; transform:translateY(10px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
@media (max-width:480px) {
  .test-dialog { padding:30px 22px 23px; border-radius:23px; }
  .test-dialog-actions { gap:8px; }
  .test-dialog-actions button { flex:1; padding:0 12px; }
}
@media (prefers-reduced-motion:reduce) {
  .test-dialog-backdrop,.test-dialog { animation:none; }
}
