/* ============================================================
   tw99 設計系統 v1（M1 基建版）
   品牌：台灣人保代＝深海藍 #0B3D91 × 天青 #3FA9F5（house skill 已定案，避紅）
   原則：mobile-first／WCAG AA 對比／CJK 思源黑體／不用 UI 框架（反罐頭）
   M2 將依 hallmark 差異化強化 signature；本檔為全站 token 權威。
   ============================================================ */

:root {
  /* 色彩 tokens */
  --tw-navy: #0B3D91;        /* 主色：深海藍 */
  --tw-navy-deep: #072a66;   /* 主色深階（hover/漸層端） */
  --tw-sky: #3FA9F5;         /* 輔色：天青 */
  --tw-sky-soft: #e6f3fd;    /* 天青淡底 */
  --tw-ink: #1a2333;         /* 內文墨色（非純黑） */
  --tw-ink-soft: #4a566b;    /* 次要文字 */
  --tw-paper: #f7f9fc;       /* 頁面底 */
  --tw-white: #ffffff;
  --tw-gold: #d9a441;        /* 點綴金（名人榜/成就），少量使用 */
  --tw-line: #dce3ee;

  /* 字體 */
  --font-sans: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;

  /* 節奏 */
  --radius: 10px;
  --shadow: 0 2px 12px rgba(11, 61, 145, .08);
  --container: 1120px;
}

/* ── Reset 精簡 ── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;              /* 中文行高（年長讀者可讀性） */
  color: var(--tw-ink);
  background: var(--tw-paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--tw-navy); }
a:hover { color: var(--tw-sky); }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 16px; }

/* ── 無障礙 ── */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--tw-navy); color: #fff; padding: 8px 16px; z-index: 100;
}
.skip-link:focus { left: 0; color: #fff; }
:focus-visible { outline: 3px solid var(--tw-sky); outline-offset: 2px; }

/* ── Header（手機優先）── */
.site-header {
  background: var(--tw-white);
  border-bottom: 3px solid var(--tw-navy);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--tw-navy), var(--tw-sky));
  color: #fff; font-weight: 900; font-size: 20px; letter-spacing: -1px;
}
.brand-text { font-weight: 700; color: var(--tw-ink); line-height: 1.25; }
.brand-text small { display: block; font-weight: 500; color: var(--tw-ink-soft); font-size: 12px; }

.nav-toggle { display: none; }
.nav-toggle-btn {
  display: inline-flex; flex-direction: column; gap: 5px;
  padding: 10px; cursor: pointer; border-radius: 8px;
}
.nav-toggle-btn span { width: 24px; height: 3px; background: var(--tw-navy); border-radius: 2px; transition: .2s; }
.site-nav { display: none; width: 100%; }
.nav-toggle:checked ~ .site-nav { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 8px 0 12px; display: flex; flex-direction: column; gap: 2px; }
.site-nav a {
  display: block; padding: 12px 14px; text-decoration: none;
  font-weight: 500; border-radius: 8px; min-height: 44px;   /* 觸控目標 */
}
.site-nav a:hover { background: var(--tw-sky-soft); }
.nav-cta {
  background: var(--tw-navy); color: #fff !important;
  font-weight: 700; text-align: center;
}
.nav-cta:hover { background: var(--tw-navy-deep) !important; }

@media (min-width: 960px) {
  .nav-toggle-btn { display: none; }
  .site-nav { display: block !important; width: auto; }
  .site-nav ul { flex-direction: row; align-items: center; gap: 4px; padding: 0; }
  .site-nav a { padding: 10px 12px; font-size: 15px; }
  .nav-cta { margin-left: 8px; padding-inline: 18px; border-radius: 999px; }
}

/* ── Hero ── */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(63,169,245,.35), transparent 60%),
    linear-gradient(160deg, var(--tw-navy-deep) 0%, var(--tw-navy) 55%, #1258b8 100%);
  color: #fff;
  padding: 56px 0 64px;
}
.hero-kicker {
  display: inline-block; margin: 0 0 12px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  padding: 4px 14px; border-radius: 999px; font-size: 14px; letter-spacing: .05em;
}
.hero h1 { margin: 0 0 14px; font-size: clamp(28px, 6vw, 44px); font-weight: 900; line-height: 1.3; }
.hero-sub { max-width: 34em; margin: 0 0 24px; font-size: clamp(15px, 2.5vw, 18px); color: #dbe9ff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── 按鈕 ── */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font-weight: 700; text-decoration: none; min-height: 44px;
  transition: transform .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--tw-gold); color: #24180a; box-shadow: 0 4px 14px rgba(217,164,65,.4); }
.btn-primary:hover { color: #24180a; filter: brightness(1.06); }
.btn-ghost { border: 2px solid rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.placeholder-page .btn-primary { background: var(--tw-navy); color: #fff; box-shadow: var(--shadow); }

/* ── 特色卡 ── */
.feature-grid {
  display: grid; gap: 16px; padding-block: 40px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature-card {
  background: var(--tw-white); border: 1px solid var(--tw-line);
  border-top: 4px solid var(--tw-sky);
  border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow);
}
.feature-card h2 { margin: 0 0 8px; font-size: 19px; color: var(--tw-navy); }
.feature-card p { margin: 0 0 12px; color: var(--tw-ink-soft); font-size: 15px; }
.feature-card a { font-weight: 700; text-decoration: none; }

/* ── 資料表（考試日期等密集頁通用）── */
.data-table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; }
.data-table th { background: var(--tw-navy); color: #fff; padding: 12px 14px; text-align: left; font-size: 15px; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--tw-line); font-size: 15px; }
.data-table tr:nth-child(even) td { background: var(--tw-sky-soft); }

/* ── Footer ── */
.site-footer { background: var(--tw-ink); color: #c7d2e4; margin-top: 56px; }
.footer-inner { padding-block: 32px 24px; display: grid; gap: 14px; }
.footer-brand strong { color: #fff; font-size: 17px; }
.footer-brand p { margin: 6px 0 0; font-size: 14px; }
.footer-nap { font-style: normal; font-size: 14px; line-height: 1.9; }
.footer-nap a { color: var(--tw-sky); text-decoration: none; }
.footer-copy { margin: 0; font-size: 12.5px; color: #8b99b3; border-top: 1px solid #33405a; padding-top: 14px; }

/* ── 雜項 ── */
.sm-only { display: inline; }
@media (min-width: 720px) { .sm-only { display: none; } }
.placeholder-page { padding-block: 64px; text-align: center; }
.placeholder-page h1 { color: var(--tw-navy); }

/* ============================================================
   M2 增補：內容頁與差異化首頁
   ============================================================ */

/* ── 頁首區（內容頁共用）── */
.page-head { padding-block: 36px 8px; }
.page-head h1 { margin: 0 0 10px; font-size: clamp(24px, 5vw, 34px); color: var(--tw-navy); font-weight: 900; line-height: 1.35; }
.head-sub { display: block; font-size: .55em; font-weight: 700; color: var(--tw-sky); margin-top: 6px; letter-spacing: .04em; }
.page-lead { max-width: 44em; color: var(--tw-ink-soft); font-size: 16.5px; margin: 0 0 18px; }

/* ── 指南切換與錨點 ── */
.guide-switch { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.guide-switch a {
  flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; text-decoration: none;
  border: 1.5px solid var(--tw-line); background: #fff; font-weight: 700; font-size: 14.5px; min-height: 40px; display: inline-flex; align-items: center;
}
.guide-switch a.on { background: var(--tw-navy); border-color: var(--tw-navy); color: #fff; }
.guide-anchors { display: flex; gap: 4px 14px; flex-wrap: wrap; margin-top: 10px; font-size: 14px; }
.guide-anchors a { text-decoration: none; color: var(--tw-ink-soft); padding: 4px 2px; }
.guide-anchors a:hover { color: var(--tw-navy); }

/* ── 指南版面 ── */
.guide-layout { display: grid; gap: 24px; padding-block: 8px 40px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .guide-layout { grid-template-columns: minmax(0,1fr) 300px; align-items: start; } }
.guide-sec { background: #fff; border: 1px solid var(--tw-line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 22px; margin-bottom: 18px; scroll-margin-top: 90px; }
.guide-sec h2 { margin: 0 0 14px; color: var(--tw-navy); font-size: 22px; border-left: 5px solid var(--tw-sky); padding-left: 12px; }
.guide-sec h3 { margin: 18px 0 8px; font-size: 17px; color: var(--tw-ink); }
.table-wrap { overflow-x: auto; margin: 10px 0; }
.note { color: var(--tw-ink-soft); font-size: 14.5px; }
.callout { background: var(--tw-sky-soft); border-left: 4px solid var(--tw-sky); padding: 10px 14px; border-radius: 6px; }
.warn { background: #fdf3e6; border-left: 4px solid var(--tw-gold); padding: 10px 14px; border-radius: 6px; }
.addr { font-size: 17px; font-weight: 700; background: var(--tw-paper); padding: 12px 16px; border-radius: 8px; display: inline-block; }

/* 步驟清單 */
.step-list { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.step-list > li { counter-increment: step; position: relative; padding: 0 0 20px 56px; }
.step-list > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--tw-navy), var(--tw-sky)); color: #fff; font-weight: 900; font-size: 18px;
}
.step-list > li:not(:last-child)::after {
  content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 2px; background: var(--tw-line);
}
.step-list h3 { margin: 6px 0 6px; font-size: 17.5px; color: var(--tw-navy); }

/* 側欄 */
.guide-aside { display: grid; gap: 14px; align-content: start; }
.aside-card { background: #fff; border: 1px solid var(--tw-line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.aside-card h3 { margin: 0 0 10px; font-size: 16.5px; color: var(--tw-navy); }
.aside-links { list-style: none; margin: 0; padding: 0; }
.aside-links li { margin-bottom: 8px; }
.aside-links a { text-decoration: none; font-weight: 500; }
.aside-cta { background: linear-gradient(160deg, var(--tw-navy-deep), var(--tw-navy)); color: #fff; }
.aside-cta h3 { color: #fff; }
.aside-cta p { font-size: 14.5px; color: #dbe9ff; }

/* ── About ── */
.manifesto { margin: 0; padding: 26px 24px; border-left: 6px solid var(--tw-gold); background: #fffdf6; border-radius: var(--radius); font-size: clamp(17px, 3vw, 21px); line-height: 2; }
.manifesto-tail { color: var(--tw-navy); font-weight: 700; }
.btn-ghost-dark { border: 2px solid var(--tw-navy); color: var(--tw-navy); }
.btn-ghost-dark:hover { background: var(--tw-sky-soft); }

/* ── Join / 分眾卡 ── */
.perk-list { padding-left: 20px; }
.perk-list li { margin-bottom: 10px; }
.path-grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 14px 0 20px; }
@media (min-width: 720px) { .path-grid { grid-template-columns: repeat(3, 1fr); } }
.path-card {
  display: block; background: #fff; border: 1px solid var(--tw-line); border-radius: var(--radius);
  padding: 20px 18px; text-decoration: none; color: var(--tw-ink); box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s;
}
a.path-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(11,61,145,.14); color: var(--tw-ink); }
.path-card h3 { margin: 0 0 8px; color: var(--tw-navy); font-size: 17.5px; }
.path-card p { margin: 0 0 10px; font-size: 14.5px; color: var(--tw-ink-soft); }
.card-go { font-weight: 700; color: var(--tw-sky); font-size: 14.5px; }

/* ── Coaches ── */
.coach-grid { display: grid; gap: 18px; grid-template-columns: 1fr; padding-block: 8px 8px; }
@media (min-width: 900px) { .coach-grid { grid-template-columns: repeat(3, 1fr); } }
.coach-card { background: #fff; border: 1px solid var(--tw-line); border-top: 4px solid var(--tw-gold); border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow); }
.coach-no { font-size: 12px; letter-spacing: .2em; color: var(--tw-ink-soft); }
.coach-card h2 { margin: 2px 0 2px; color: var(--tw-navy); font-size: 21px; }
.coach-meta { margin: 0 0 10px; color: var(--tw-ink-soft); font-size: 14px; }
.coach-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.coach-badges span { background: var(--tw-sky-soft); color: var(--tw-navy); font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.coach-skill { font-size: 14.5px; }
.coach-card blockquote { margin: 12px 0 0; padding: 12px 14px; background: var(--tw-paper); border-radius: 8px; font-size: 14.5px; color: var(--tw-ink-soft); }

/* ── CTA 帶 ── */
.cta-band { text-align: center; background: linear-gradient(160deg, var(--tw-navy-deep), var(--tw-navy)); color: #fff; border-radius: var(--radius); padding: 36px 20px; margin-block: 32px 8px; }
.cta-band h2 { margin: 0 0 8px; }
.cta-band p { color: #dbe9ff; margin: 0 0 18px; }

/* ── 首頁：hero 兩欄＋考照倒數磁鐵 ── */
.hero-grid { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0,1fr) 380px; } }
.hero-trust { margin-top: 16px; font-size: 13px; color: #a8c4ee; }
.exam-magnet {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(4px); border-radius: 14px; padding: 18px 18px 14px;
}
.exam-magnet h2 { margin: 0 0 12px; font-size: 16px; letter-spacing: .06em; color: #cfe4ff; display: flex; align-items: center; gap: 8px; }
.magnet-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tw-gold); box-shadow: 0 0 0 4px rgba(217,164,65,.25); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(217,164,65,.08); } }
@media (prefers-reduced-motion: reduce) { .magnet-dot { animation: none; } }
.magnet-list { list-style: none; margin: 0; padding: 0; }
.magnet-list li { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.magnet-days { text-align: center; min-width: 58px; background: #fff; color: var(--tw-navy); border-radius: 10px; padding: 6px 4px; }
.magnet-days strong { display: block; font-size: 22px; line-height: 1.1; }
.magnet-days span { font-size: 11px; color: var(--tw-ink-soft); }
.magnet-info b { display: block; font-size: 15.5px; }
.magnet-info span { font-size: 13px; color: #cfe4ff; }
.deadline { display: block; font-style: normal; font-size: 12px; color: var(--tw-gold); }
.deadline.over { color: #ff9d9d; }
.magnet-more { display: block; text-align: right; margin-top: 10px; color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; }
.magnet-more:hover { color: var(--tw-gold); }
.magnet-fallback { color: #cfe4ff; }

/* ── 統計帶 ── */
.stat-band { background: #fff; border-bottom: 1px solid var(--tw-line); }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding-block: 20px; }
@media (min-width: 720px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { text-align: center; padding: 8px; }
.stat strong { display: block; font-size: clamp(22px, 4vw, 30px); color: var(--tw-navy); font-weight: 900; }
.stat span { font-size: 13.5px; color: var(--tw-ink-soft); }

/* ── 首頁節區 ── */
.sec-title { text-align: center; color: var(--tw-navy); font-size: clamp(20px, 4vw, 27px); margin: 36px 0 20px; }
.audience { padding-bottom: 8px; }
.flow-band { background: var(--tw-sky-soft); padding: 8px 0 36px; margin-top: 28px; }
.flow-steps { list-style: none; display: grid; gap: 10px; grid-template-columns: 1fr; margin: 0 0 22px; padding: 0; }
@media (min-width: 860px) { .flow-steps { grid-template-columns: repeat(5, 1fr); } }
.flow-steps li { background: #fff; border-radius: var(--radius); padding: 16px 12px; text-align: center; box-shadow: var(--shadow); }
.flow-steps b { display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto 8px; border-radius: 50%; background: var(--tw-navy); color: #fff; }
.flow-steps span { font-size: 14px; line-height: 1.6; }
.hero-actions.center { justify-content: center; }

.fame-teaser { text-align: center; padding-bottom: 6px; }
.fame-list { list-style: none; margin: 0 auto 12px; padding: 0; max-width: 620px; }
.fame-list li { display: flex; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid var(--tw-line); border-radius: 10px; padding: 12px 18px; margin-bottom: 8px; box-shadow: var(--shadow); }
.fame-name { font-weight: 900; color: var(--tw-navy); }
.fame-cat { color: var(--tw-gold); font-weight: 700; }
.fame-date { color: var(--tw-ink-soft); font-size: 14px; }
.link-more { font-weight: 700; text-decoration: none; }

.duo-grid { display: grid; gap: 16px; grid-template-columns: 1fr; padding-block: 20px 8px; }
@media (min-width: 860px) { .duo-grid { grid-template-columns: 1fr 1fr; } }
.duo-card { background: #fff; border: 1px solid var(--tw-line); border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow); }
.duo-card h2 { margin: 0 0 10px; color: var(--tw-navy); font-size: 19px; }

/* 救援表 */
.rescue-table td a { font-weight: 600; }

/* Contact */
.contact-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-card { display: block; background: var(--tw-paper); border: 1.5px solid var(--tw-line); border-radius: var(--radius); padding: 20px 18px; text-decoration: none; color: var(--tw-ink); }
.contact-card b { display: block; color: var(--tw-ink-soft); font-size: 14px; margin-bottom: 6px; }
.contact-card strong { display: block; font-size: 20px; color: var(--tw-navy); margin-bottom: 4px; }
.contact-card span { font-size: 13.5px; color: var(--tw-ink-soft); }
a.contact-card:hover { border-color: var(--tw-sky); }

/* ============================================================
   M3/M4 增補：表單・會員・題庫引擎
   ============================================================ */
[v-cloak] { display: none; }

/* 篩選列（考試日期/課程） */
.filter-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; background: #fff; border: 1px solid var(--tw-line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.filter-bar label { font-size: 14px; font-weight: 700; color: var(--tw-ink-soft); display: grid; gap: 4px; }
.filter-bar select { padding: 9px 12px; border: 1.5px solid var(--tw-line); border-radius: 8px; font-family: var(--font-sans); font-size: 15px; min-width: 160px; background: #fff; }
.btn-sm { padding: 9px 20px; font-size: 14.5px; }
.btn-block { display: block; width: 100%; text-align: center; border: 0; cursor: pointer; font-family: var(--font-sans); font-size: 16px; }

/* 分頁 */
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 18px 0; }
.pg { min-width: 38px; min-height: 38px; display: inline-grid; place-items: center; border-radius: 8px; text-decoration: none; border: 1.5px solid var(--tw-line); background: #fff; font-weight: 700; }
.pg.on { background: var(--tw-navy); color: #fff; border-color: var(--tw-navy); }
.pg.gap { border: 0; background: none; }

/* 聯絡表單 tabs（純 CSS） */
.contact-wrap { padding-bottom: 40px; }
.ctab-radio { position: absolute; opacity: 0; pointer-events: none; }
.ctab-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ctab-bar label { padding: 11px 20px; border-radius: 999px; border: 1.5px solid var(--tw-line); background: #fff; font-weight: 700; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.ctab-panel { display: none; background: #fff; border: 1px solid var(--tw-line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 22px; }
#tab-student:checked ~ .ctab-bar label[for="tab-student"],
#tab-coach:checked ~ .ctab-bar label[for="tab-coach"],
#tab-service:checked ~ .ctab-bar label[for="tab-service"] { background: var(--tw-navy); color: #fff; border-color: var(--tw-navy); }
#tab-student:checked ~ .panel-student, #tab-coach:checked ~ .panel-coach, #tab-service:checked ~ .panel-service { display: block; }
.contact-alt { margin-top: 18px; }
.form-errors ul { margin: 0; padding-left: 20px; }

/* 表單欄位 */
.lead-form label { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 12px; }
.lead-form input[type=text], .lead-form input[type=tel], .lead-form input[type=email], .lead-form input[type=password], .lead-form textarea,
.login-card input[type=text], .login-card input[type=password] {
  display: block; width: 100%; margin-top: 4px; padding: 11px 12px; font-family: var(--font-sans); font-size: 15.5px;
  border: 1.5px solid var(--tw-line); border-radius: 8px; background: #fff;
}
.lead-form fieldset { border: 1px solid var(--tw-line); border-radius: 8px; padding: 10px 14px 6px; margin: 0 0 14px; }
.lead-form legend { font-weight: 700; font-size: 14.5px; color: var(--tw-navy); padding: 0 6px; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span2 { grid-column: span 2; } }
.opt-grid { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.opt { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; padding: 8px 12px; border-radius: 8px; cursor: pointer; min-height: 40px; }
.opt:hover { background: var(--tw-sky-soft); }
.opt input { width: 18px; height: 18px; accent-color: var(--tw-navy); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead-form button.btn { border: 0; cursor: pointer; font-family: var(--font-sans); font-size: 16px; margin-top: 6px; }

/* 登入 */
.login-wrap { display: grid; place-items: center; padding-block: 48px; }
.login-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--tw-line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 26px; }
.login-card h1 { margin: 0 0 10px; color: var(--tw-navy); font-size: 24px; }
.login-card label { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 14px; }
.login-card .btn { margin-top: 4px; }

/* 題庫 UI */
.subject-chip { display: inline-flex; align-items: center; padding: 10px 18px; margin: 4px; border-radius: 999px; border: 1.5px solid var(--tw-line); background: #fff; text-decoration: none; font-weight: 700; min-height: 44px; }
.subject-chip:hover { border-color: var(--tw-sky); background: var(--tw-sky-soft); }
.exam-toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; background: #fff; border: 1px solid var(--tw-line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--shadow); position: sticky; top: 68px; z-index: 10; }
.view-tabs { display: flex; gap: 6px; }
.view-tabs button { padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--tw-line); background: #fff; font-family: var(--font-sans); font-weight: 700; cursor: pointer; }
.view-tabs button.on { background: var(--tw-navy); color: #fff; border-color: var(--tw-navy); }
.mark-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mark-actions .btn { border-width: 1.5px; cursor: pointer; font-family: var(--font-sans); }
.q-list { list-style: none; margin: 0; padding: 0; }
.q-list > li { background: #fff; border: 1px solid var(--tw-line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.q-list > li.wrong { border-left: 4px solid #d9534f; }
.q-list > li.lastseen { border-left: 4px solid var(--tw-gold); }
.q-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 6px; }
.q-no { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; background: var(--tw-sky-soft); color: var(--tw-navy); font-weight: 900; }
.q-mark { font-size: 13.5px; display: inline-flex; gap: 4px; align-items: center; color: var(--tw-ink-soft); }
.q-ans { margin-left: auto; font-size: 14px; color: var(--tw-ink-soft); }
.q-ans b, .correct { color: #1a7f37; }
.q-text { margin: 4px 0 8px; white-space: pre-wrap; }
.q-items { list-style: none; margin: 0; padding: 0; }
.q-items li { padding: 2px 0; }
.q-analysis { background: var(--tw-paper); border-radius: 8px; padding: 8px 12px; font-size: 14px; color: var(--tw-ink-soft); }
.q-input .ans-input { width: 90px; padding: 8px 10px; border: 1.5px solid var(--tw-line); border-radius: 8px; font-size: 16px; text-align: center; }
.btn-link { background: none; border: 0; text-decoration: underline; cursor: pointer; font-family: var(--font-sans); font-size: 14px; color: var(--tw-navy); }
.btn-link.danger { color: #b02a37; }
