/* ============================================================
   MBT1 — 共用樣式（極簡・白底）
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --card: #ffffff;
  --ink: #18181b;        /* 主文字 近黑 */
  --ink-2: #3f3f46;
  --muted: #8a8a94;      /* 次要灰 */
  --brand: #6d5efc;      /* 主點綴色 柔和靛紫 */
  --brand-ink: #5646e0;
  --pink: #ec4899;
  --ok: #16a34a;
  --line: #ececef;       /* 細邊框 */
  --line-strong: #dcdce1;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(24,24,27,.04), 0 8px 30px rgba(24,24,27,.06);
  /* 四大人格家族色 */
  --gA: #6d5efc;  /* 分析家 紫 */
  --gD: #16a34a;  /* 外交官 綠 */
  --gS: #0ea5e9;  /* 守護者 藍 */
  --gE: #f59e0b;  /* 探索家 橘 */
  --c: var(--brand); /* 卡片動態色，JS 會覆寫 */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(680px 420px at 10% -6%, rgba(109,94,252,.12), transparent 60%),
    radial-gradient(620px 420px at 92% -8%, rgba(245,158,11,.12), transparent 60%),
    radial-gradient(560px 460px at 55% -12%, rgba(14,165,233,.10), transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .1px;
}
a { color: inherit; }
.wrap { width: min(880px, 90vw); margin: 0 auto; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ---- Header ---- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .3px; font-size: 19px; text-decoration: none; color: var(--ink); line-height: 1.15; }
.brand .dot {
  width: 38px; height: 38px; flex: none;
  background: url("../favicon.svg") center/contain no-repeat;
  font-size: 0; /* 隱藏舊的 "M1" 文字，改用 SVG 標誌 */
}
.brand small { display: block; color: var(--muted); font-weight: 600; font-size: 11px; margin-top: 1px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 0; border-radius: 999px; padding: 13px 26px;
  font-size: 16px; font-weight: 700; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, #6d5efc, #ec4899);
  box-shadow: 0 8px 22px rgba(109,94,252,.28);
  transition: transform .15s ease, box-shadow .15s, opacity .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(109,94,252,.36); }
.btn.ghost { background: #fff; border: 1px solid var(--line-strong); color: var(--ink); box-shadow: none; }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); background: #fff; }
.btn.accent { background: linear-gradient(135deg, var(--brand), #22d3ee); }
.btn.line { background: #06c755; box-shadow: 0 8px 22px rgba(6,199,85,.28); color: #fff; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ---- Hero ---- */
.hero { padding: 56px 0 36px; }
.hero h1 { font-size: clamp(32px, 5.6vw, 56px); line-height: 1.18; margin: 20px 0 16px; font-weight: 800; letter-spacing: -.5px; }
.hero h1 .grad { background: linear-gradient(100deg, #6d5efc 0%, #ec4899 45%, #f59e0b 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(16px, 2.2vw, 19px); color: var(--ink-2); max-width: 580px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 999px; background: #f4f2ff; border: 1px solid #e7e3ff; font-size: 13px; font-weight: 600; color: var(--brand-ink); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; align-items: center; }
.stats { display: flex; gap: 40px; margin-top: 44px; flex-wrap: wrap; }
.stats div b { display: block; font-size: 30px; font-weight: 900; letter-spacing: -.5px; background: linear-gradient(135deg, #6d5efc, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats div span { color: var(--muted); font-size: 13px; }

/* ---- Type grid ---- */
.section { padding: 52px 0; }
.section h2 { font-size: clamp(22px, 3.4vw, 30px); margin: 0 0 8px; font-weight: 800; letter-spacing: -.3px; }
.section > h2::after { content: ""; display: block; width: 46px; height: 4px; border-radius: 3px; margin-top: 12px; background: linear-gradient(90deg, var(--brand), var(--pink)); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 12px; margin-top: 26px; }
.tcard { background: color-mix(in srgb, var(--c) 7%, #fff); border: 1px solid color-mix(in srgb, var(--c) 24%, #fff); border-top: 3px solid var(--c); border-radius: 14px; padding: 18px 16px; transition: transform .15s, box-shadow .15s; }
.tcard:hover { transform: translateY(-3px); box-shadow: 0 12px 26px color-mix(in srgb, var(--c) 26%, transparent); }
.tcard .emoji { font-size: 30px; }
.tcard .code { font-weight: 900; letter-spacing: 1px; margin-top: 8px; color: var(--c); }
.tcard .nm { color: var(--ink-2); font-size: 13px; }

/* ---- Card ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }

/* ---- Test page ---- */
.test-stage { min-height: 100vh; display: grid; place-items: center; padding: 30px 0; }
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .3s ease; }
.qnum { color: var(--muted); font-size: 14px; margin: 22px 0 6px; }
.qtext { font-size: clamp(22px, 4vw, 30px); font-weight: 800; margin: 0 0 36px; min-height: 88px; letter-spacing: -.3px; }
.scale { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scale .lab { font-size: 13px; color: var(--muted); width: 56px; }
.scale .lab.r { text-align: right; }
.dots { display: flex; align-items: center; gap: clamp(8px, 2.4vw, 18px); }
.dot-opt {
  border-radius: 50%; border: 2px solid var(--line-strong); background: #fff; cursor: pointer;
  transition: transform .12s, background .12s, border-color .12s;
}
.dot-opt:hover { transform: scale(1.12); }
.dot-opt.agree { border-color: #8fd6a8; }
.dot-opt.agree:hover, .dot-opt.agree.sel { background: var(--ok); border-color: var(--ok); }
.dot-opt.disagree { border-color: #c3bcff; }
.dot-opt.disagree:hover, .dot-opt.disagree.sel { background: var(--brand); border-color: var(--brand); }
.dot-opt.neutral { border-color: var(--line-strong); }
.dot-opt.neutral:hover, .dot-opt.neutral.sel { background: var(--muted); border-color: var(--muted); }
.s3 { width: 50px; height: 50px; } .s2 { width: 40px; height: 40px; } .s1 { width: 30px; height: 30px; } .s0 { width: 24px; height: 24px; }
.test-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 34px; }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; }
.linkbtn:hover { color: var(--ink); }

/* ---- Result page ---- */
.result-head { text-align: center; padding-top: 28px; }
.result-head .emoji { font-size: 60px; }
.result-head .type { font-size: clamp(44px, 9vw, 72px); font-weight: 900; letter-spacing: 4px; color: var(--ink); }
.result-head .nm { font-size: 22px; font-weight: 800; }
.bars { display: grid; gap: 18px; margin-top: 10px; }
.bar .top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; color: var(--ink-2); }
.bar .track { height: 10px; background: var(--line); border-radius: 999px; position: relative; overflow: hidden; }
.bar .track > i { position: absolute; top: 0; bottom: 0; left: 0; background: var(--brand); border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.chip { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 14px; }

/* 深度報告內容（result 解鎖區） */
.report > h3 { font-size: 18px; font-weight: 800; letter-spacing: -.2px; margin: 24px 0 8px; }
.report > h3:first-of-type { margin-top: 8px; }
.report p { color: var(--ink-2); margin: 0 0 12px; line-height: 1.85; }
.report > ul { margin: 0 0 14px; padding-left: 4px; list-style: none; display: grid; gap: 8px; }
.report > ul > li { position: relative; padding-left: 26px; color: var(--ink-2); }
.report > ul > li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 900; }
.report > ul.warn > li::before { content: "！"; color: #e0902b; }
/* 認知功能卡 */
.fnlist { display: grid; gap: 10px; margin: 0 0 14px; }
.fn { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--bg-soft); }
.fn-h { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.fn-code { font-weight: 900; color: var(--brand); font-size: 16px; min-width: 30px; }
.fn-h b { font-size: 15px; }
.fn-role { margin-left: auto; font-size: 12px; color: var(--muted); background: #fff; border: 1px solid var(--line); padding: 2px 11px; border-radius: 999px; }
.fn p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.7; }
/* 講師親筆信 */
.letter { margin-top: 28px; border: 1px solid #e7e3ff; background: linear-gradient(180deg, #faf9ff, #f4f2ff); border-radius: 16px; padding: 26px 28px; }
.letter h3 { font-size: 18px; font-weight: 800; margin: 0 0 14px; color: var(--brand-ink); }
.letter p { color: var(--ink-2); line-height: 1.95; margin: 0 0 14px; }
.letter .sign { text-align: right; font-weight: 800; color: var(--brand-ink); margin: 4px 0 0; }

/* locked deep report */
.locked { position: relative; margin-top: 18px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
/* 模糊內容墊在後面（絕對定位），遮罩在正常流、由它決定整塊高度 → 遮罩內容永不被截 */
.locked .blurred { position: absolute; inset: 0; padding: 28px; filter: blur(6px); user-select: none; pointer-events: none; overflow: hidden; }
.locked .gate {
  position: relative; z-index: 1; display: grid; place-items: center; text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,.96));
  padding: 32px 24px;
}
.gate .lock-emoji { font-size: 32px; }
.gate form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 14px; width: min(440px, 92%); }
.gate input { flex: 1; min-width: 200px; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font-size: 16px; }
.gate input:focus { outline: none; border-color: var(--brand); }
.gate .or { color: var(--muted); font-size: 13px; margin: 12px 0 4px; }

.share-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 26px 0; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; font-weight: 700; padding: 12px 22px; border-radius: 999px; opacity: 0; transition: all .25s; pointer-events: none; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

footer { padding: 40px 0 54px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); margin-top: 48px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 18px; }
.foot-nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; }
.foot-nav a:hover { color: var(--brand); }
.disclaimer { font-size: 12px; color: var(--muted); }

/* ============ 型格頁（type/*.html）============ */
.breadcrumb { font-size: 13px; color: var(--muted); padding: 8px 0 0; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.type-hero { padding: 18px 0 8px; }
.group-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; padding: 5px 13px; border-radius: 999px; color: #fff; }
.type-hero .emoji { font-size: 56px; line-height: 1; }
.type-hero h1 { font-size: clamp(30px, 5.4vw, 50px); font-weight: 800; letter-spacing: -.5px; margin: 14px 0 6px; }
.type-hero h1 .code { color: var(--brand); }
.type-hero .tagline { font-size: clamp(16px, 2.2vw, 20px); color: var(--ink-2); margin: 0; }

.answer-box { background: var(--bg-soft); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 20px 22px; margin: 26px 0; }
.answer-box .q { font-weight: 800; margin: 0 0 6px; }
.answer-box p { margin: 0; color: var(--ink-2); }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 30px; }
.toc a { font-size: 13px; color: var(--ink-2); text-decoration: none; background: var(--bg-soft); border: 1px solid var(--line); padding: 6px 13px; border-radius: 999px; }
.toc a:hover { border-color: var(--brand); color: var(--brand); }

.prose { max-width: 720px; }
.prose section { padding: 26px 0; border-top: 1px solid var(--line); }
.prose h2 { font-size: clamp(20px, 3.2vw, 26px); font-weight: 800; letter-spacing: -.3px; margin: 0 0 12px; scroll-margin-top: 20px; }
.prose p { color: var(--ink-2); margin: 0 0 14px; }
.prose ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.prose ul li { position: relative; padding-left: 28px; color: var(--ink-2); }
.prose ul li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--brand); font-weight: 900; }
.prose ul.warn li::before { content: "！"; color: #e0902b; }
.prose ul.career li::before { content: "→"; }

.coach { background: linear-gradient(180deg, #faf9ff, #f4f2ff); border: 1px solid #e7e3ff; border-radius: 14px; padding: 20px 22px; color: var(--ink); }
.coach .who { font-weight: 800; color: var(--brand-ink); margin: 0 0 6px; font-size: 14px; }
.coach p { margin: 0; color: var(--ink-2); }

.compat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .compat-grid { grid-template-columns: 1fr; } }
.compat-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.compat-card h3 { margin: 0 0 10px; font-size: 15px; }
.compat-card .links { display: flex; flex-wrap: wrap; gap: 8px; }
.compat-card a { text-decoration: none; font-weight: 700; font-size: 14px; border: 1px solid var(--line-strong); padding: 7px 13px; border-radius: 999px; }
.compat-card a:hover { border-color: var(--brand); color: var(--brand); }

.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; float: right; color: var(--muted); }
.faq details[open] summary::after { content: "－"; }
.faq details p { color: var(--ink-2); padding: 0 0 14px; margin: 0; }

.cta-band { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 34px; text-align: center; margin: 36px 0; }
.cta-band h2 { color: #fff; margin: 0 0 8px; }
.cta-band p { color: rgba(255,255,255,.7); margin: 0 0 18px; }
.cta-band .btn { background: #fff; color: var(--ink); border-color: #fff; }
.othertypes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.othertypes a { text-decoration: none; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 13px; transition: border-color .15s; }
.othertypes a:hover { border-color: var(--brand); }
.othertypes a b { display: block; font-size: 15px; letter-spacing: 1px; }
.othertypes a span { color: var(--muted); }

/* 文章列表卡片 */
.artlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.artcard { display: flex; flex-direction: column; gap: 8px; text-decoration: none; border: 1px solid var(--line); border-radius: 14px; padding: 18px; transition: border-color .15s, transform .15s; background: var(--card); }
.artcard { border-top: 3px solid var(--c); }
.artcard:hover { border-color: color-mix(in srgb, var(--c) 45%, #fff); transform: translateY(-3px); box-shadow: 0 12px 26px color-mix(in srgb, var(--c) 20%, transparent); }
.artcard .tag { align-self: flex-start; font-size: 12px; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); border: 1px solid color-mix(in srgb, var(--c) 28%, #fff); padding: 3px 11px; border-radius: 999px; }
.artcard b { font-size: 16px; line-height: 1.5; color: var(--ink); }
.artcard .meta { font-size: 12px; color: var(--muted); margin-top: auto; }

/* 文章：hero 圖 / byline / 摘要 / 目錄 */
.hero-img { width: 100%; height: auto; aspect-ratio: 1200 / 420; object-fit: cover; border-radius: var(--radius); display: block; }
.byline { color: var(--muted); font-size: 14px; margin: 0 0 6px; }
.byline b { color: var(--ink-2); font-weight: 700; }
.answer-box .ab-label { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; color: var(--brand-ink); margin-bottom: 6px; }
.toc-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin: 10px 0 26px; }
.toc-box .toc-h { font-weight: 800; margin-bottom: 10px; }
.toc-box ol { margin: 0; padding-left: 20px; color: var(--ink-2); display: grid; gap: 7px; }
.toc-box ol li a { color: var(--ink-2); text-decoration: none; }
.toc-box ol li a:hover { color: var(--brand); text-decoration: underline; }
.prose section[id] { scroll-margin-top: 16px; }
.prose h3 { font-size: 17px; font-weight: 800; letter-spacing: -.2px; margin: 20px 0 8px; }
.casebox { background: #fff7ed; border: 1px solid #fde4c8; border-left: 4px solid #f59e0b; border-radius: 12px; padding: 18px 20px; }
.casebox p { margin: 0; color: var(--ink-2); line-height: 1.9; }
/* 文末作者介紹框 */
.authorbox { display: flex; gap: 18px; align-items: flex-start; background: linear-gradient(180deg, #faf9ff, #f4f2ff); border: 1px solid #e7e3ff; border-radius: 16px; padding: 24px; margin: 32px 0; }
.authorbox-avatar { width: 60px; height: 60px; flex: none; border-radius: 14px; background: url("../favicon.svg") center/contain no-repeat; }
.authorbox-body { flex: 1; min-width: 0; }
.authorbox-name { font-weight: 800; font-size: 17px; margin-bottom: 8px; }
.authorbox-body p { margin: 0 0 10px; color: var(--ink-2); font-size: 14px; line-height: 1.85; }
.authorbox-principles { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 7px; }
.authorbox-principles li { position: relative; padding-left: 24px; font-size: 14px; color: var(--ink-2); }
.authorbox-principles li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 900; }
.authorbox-links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.authorbox-links a { font-weight: 700; font-size: 14px; color: var(--brand-ink); text-decoration: none; }
.authorbox-links a:hover { text-decoration: underline; }
.authorbox-disclaim { font-size: 12px !important; color: var(--muted) !important; margin-top: 12px !important; }
/* 講師團隊卡片 */
.teacher-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 26px; }
.teacher { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.teacher:hover { transform: translateY(-3px); box-shadow: 0 14px 30px color-mix(in srgb, var(--c) 22%, transparent); }
.teacher-av { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 900; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #fff)); margin-bottom: 14px; }
.teacher-name { font-size: 18px; font-weight: 800; }
.teacher-role { font-size: 13px; font-weight: 700; color: var(--c); margin: 2px 0 10px; }
.teacher-bio { font-size: 14px; color: var(--ink-2); line-height: 1.8; margin: 0 0 12px; }
.teacher-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.teacher-tags span { font-size: 12px; color: var(--ink-2); background: var(--bg-soft); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; }

/* 關於我們：條列特色 */
.feat-list { list-style: none; padding: 0; margin: 0; max-width: 720px; display: grid; gap: 12px; }
.feat-list li { position: relative; padding-left: 30px; color: var(--ink-2); line-height: 1.8; }
.feat-list li::before { content: "✓"; position: absolute; left: 0; top: 1px; color: var(--brand); font-weight: 900; }
.feat-list b { color: var(--ink); }
