/* ============================================================
   程度測驗（class 前綴 pt-）
   ------------------------------------------------------------
   設計語彙沿用模擬測驗（lt-）：淡底、白色卡片、10px 圓角、按鈕與輸入框 7px、
   標籤 999px，卡片只有邊框不加陰影。色碼一律使用 article.css 的 --article-* 變數
   （各頁一併載入 article.css，故不需重複宣告）。
   刻意不載入 level-test.css，兩個功能的樣式才不會互相牽動。

   響應式斷點：
     1100px 以下  兩欄改為單欄
      768px 以下  統計格線與圖表改為較窄的格線
      560px 以下  全部單欄、作答列改為兩列
   ============================================================ */
.pt-page {
  background: var(--article-bg);
  padding: 26px 0 60px;
  font-size: 17px;
}

.pt-shell {
  /* 與首頁（.hm-shell）及頁首選單（.header-inner）同寬 */
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------------------------------------
   通用：主視覺／麵包屑／標題／卡片／按鈕
   --------------------------------------------- */
.pt-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: linear-gradient(120deg, var(--article-primary), var(--article-primary-dark));
  border-radius: 10px;
  padding: 42px 40px;
  color: #fff;
  margin-bottom: 26px;
}

.pt-hero::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.pt-hero-text {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.pt-hero-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.pt-hero-title {
  margin: 12px 0 10px;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
}

.pt-hero-desc {
  margin: 0;
  line-height: 1.8;
  opacity: 0.92;
}

.pt-hero-icon {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 54px;
}

.pt-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 15px;
  color: var(--article-muted);
  margin-bottom: 16px;
}

.pt-crumb a {
  color: var(--article-primary);
}

.pt-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 700;
  color: var(--article-ink);
  margin: 6px 0 14px;
}

.pt-section-title small {
  font-size: 15px;
  font-weight: 400;
  color: var(--article-muted);
}

.pt-section-title i {
  color: var(--article-primary);
}

.pt-panel {
  background: var(--article-surface);
  border: 1px solid var(--article-card-border);
  border-radius: 10px;
  padding: 20px;
}

.pt-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px;
}

.pt-panel-title i {
  color: var(--article-primary);
}

.pt-panel-text {
  margin: 0;
  font-size: 15px;
  color: var(--article-muted);
  line-height: 1.7;
}

.pt-empty {
  background: var(--article-surface);
  border: 1px dashed var(--article-card-border);
  border-radius: 10px;
  padding: 36px 20px;
  text-align: center;
  color: var(--article-muted);
}

.pt-empty i {
  display: block;
  font-size: 32px;
  margin-bottom: 10px;
  color: var(--article-primary);
  opacity: 0.6;
}

.pt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 7px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pt-btn-main {
  background: var(--article-primary);
  color: #fff;
}

.pt-btn-main:hover {
  background: var(--article-primary-dark);
  color: #fff;
}

.pt-btn-line {
  background: var(--article-surface);
  border-color: var(--article-card-border);
  color: var(--article-ink);
}

.pt-btn-line:hover {
  border-color: var(--article-primary);
  color: var(--article-primary);
}

.pt-btn-block {
  display: flex;
  width: 100%;
  margin-top: 12px;
}

.pt-btn-lg {
  min-height: 52px;
  padding: 14px 44px;
  font-size: 19px;
}

.pt-btn:disabled,
.pt-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.pt-inline-form {
  display: inline;
}

/* 兩欄版面 */
.pt-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-areas: 'main side';
  gap: 24px;
  align-items: start;
}

.pt-col-main {
  grid-area: main;
  min-width: 0;
}

.pt-col-side {
  grid-area: side;
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------------------------------------------
   介紹頁
   --------------------------------------------- */
.pt-parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.pt-part {
  display: flex;
  gap: 16px;
  background: var(--article-surface);
  border: 1px solid var(--article-card-border);
  border-radius: 10px;
  padding: 20px;
}

.pt-part-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--article-surface-3);
  color: var(--article-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.pt-part-body {
  flex: 1;
  min-width: 0;
}

.pt-part-name {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 4px;
}

.pt-part-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-bottom: 8px;
}

.pt-part-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--article-surface-3);
  color: var(--article-muted);
  font-size: 14px;
}

.pt-part-cats {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pt-part-cats li {
  font-size: 14px;
  color: var(--article-ink);
  padding: 2px 10px;
  border: 1px solid var(--article-line);
  border-radius: 999px;
}

.pt-part-cats li b {
  color: var(--article-primary);
}

.pt-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.pt-step {
  display: flex;
  gap: 14px;
  background: var(--article-surface);
  border: 1px solid var(--article-card-border);
  border-radius: 10px;
  padding: 16px 18px;
}

.pt-step-no {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--article-surface-3);
  color: var(--article-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-step-name {
  font-weight: 700;
  margin-bottom: 2px;
}

.pt-step-desc {
  margin: 0;
  font-size: 15px;
  color: var(--article-muted);
  line-height: 1.7;
}

.pt-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(245, 158, 11, 0.12);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--article-warm);
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.7;
}

.pt-notice i {
  flex: 0 0 auto;
  margin-top: 4px;
}

.pt-levels {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.pt-levels li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--article-line);
  border-radius: 7px;
  font-size: 15px;
}

.pt-level-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.pt-level-dot-1 { background: var(--level-1); }
.pt-level-dot-2 { background: var(--level-2); }
.pt-level-dot-3 { background: var(--level-3); }
.pt-level-dot-4 { background: var(--level-4); }

.pt-levels b {
  flex: 0 0 auto;
  color: var(--article-ink);
}

.pt-levels small {
  margin-left: auto;
  color: var(--article-muted);
  font-size: 13px;
  white-space: nowrap;
}

/* 上一次結果 */
.pt-last {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pt-last-score {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--article-surface-3);
  color: var(--article-primary);
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-last-info {
  flex: 1;
  min-width: 0;
}

.pt-last-level {
  display: block;
  font-weight: 700;
}

.pt-last-date {
  font-size: 14px;
  color: var(--article-muted);
}

.pt-level-chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--article-surface-3);
  color: var(--article-primary);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------------------------------------------
   作答頁
   --------------------------------------------- */
.pt-shell.pt-take {
  max-width: 1000px;
}

.pt-bar {
  position: sticky;
  top: var(--header-height, 66px);
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    'name progress timer'
    'track track track'
    'steps steps steps';
  align-items: center;
  column-gap: 16px;
  row-gap: 8px;
  background: var(--article-surface);
  border: 1px solid var(--article-card-border);
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 20px;
}

.pt-bar-name {
  grid-area: name;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pt-bar-progress {
  grid-area: progress;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--article-muted);
  white-space: nowrap;
}

.pt-bar-progress b {
  color: var(--article-primary);
  font-size: 17px;
}

.pt-bar-save {
  font-size: 14px;
  color: var(--article-muted);
  white-space: nowrap;
}

.pt-bar-save:empty {
  display: none;
}

.pt-bar-save.is-error {
  color: var(--article-danger);
}

.pt-bar-timer {
  grid-area: timer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--article-surface-3);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 18px;
  color: var(--article-primary);
}

.pt-bar-timer.is-hurry {
  background: rgba(229, 72, 77, 0.12);
  color: var(--article-danger);
}

.pt-bar-track {
  grid-area: track;
  height: 6px;
  border-radius: 999px;
  background: var(--article-surface-3);
  overflow: hidden;
}

.pt-bar-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--article-primary);
  transition: width 0.25s;
}

.pt-bar-steps {
  grid-area: steps;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.pt-bar-steps::-webkit-scrollbar {
  display: none;
}

.pt-nav-step {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 6px;
  border-radius: 999px;
  border: 1px solid var(--article-card-border);
  font-size: 14px;
  color: var(--article-muted);
  white-space: nowrap;
}

.pt-nav-step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--article-surface-3);
  font-size: 13px;
  font-weight: 700;
  color: var(--article-muted);
}

.pt-nav-step.is-done {
  border-color: rgba(34, 139, 96, 0.4);
  color: var(--article-success);
}

.pt-nav-step.is-done .pt-nav-step-no {
  background: var(--article-success);
  color: #fff;
}

.pt-nav-step.is-current {
  border-color: var(--article-primary);
  background: var(--article-primary);
  color: #fff;
}

.pt-nav-step.is-current .pt-nav-step-no {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.pt-instructions {
  display: flex;
  gap: 10px;
  background: var(--article-surface-2);
  border-left: 3px solid var(--article-primary);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  color: var(--article-ink);
  line-height: 1.8;
  margin: 0 0 16px;
}

.pt-instructions i {
  flex: 0 0 auto;
  margin-top: 5px;
  color: var(--article-primary);
}

.pt-guest-note {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 15px;
  color: var(--article-muted);
  margin: 0 0 16px;
}

.pt-guest-note a {
  color: var(--article-primary);
  font-weight: 700;
}

/* 題目卡 */
.pt-item {
  background: var(--article-surface);
  border: 1px solid var(--article-card-border);
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 14px;
  scroll-margin-top: 150px;
}

.pt-item-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 10px;
}

.pt-item-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--article-surface-3);
  color: var(--article-primary);
  font-size: 15px;
  font-weight: 700;
}

.pt-item.is-answered .pt-item-no {
  background: var(--article-primary);
  color: #fff;
}

.pt-item-cat {
  font-size: 14px;
  color: var(--article-muted);
}

.pt-passage {
  background: var(--article-surface-2);
  border: 1px solid var(--article-line);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 14px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.pt-image {
  margin: 0 0 14px;
}

.pt-image img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  border-radius: 8px;
  border: 1px solid var(--article-card-border);
  background: var(--article-surface-2);
}

/* 聽力音檔 */
.pt-audio {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--article-surface-2);
  border: 1px solid var(--article-line);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.pt-audio-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--article-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.pt-audio-player {
  flex: 1 1 240px;
  min-width: 0;
  max-width: 460px;
  height: 40px;
}

.pt-audio-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--article-surface-3);
  font-size: 14px;
  color: var(--article-muted);
  white-space: nowrap;
}

.pt-audio-note b {
  color: var(--article-primary);
}

.pt-audio.is-used {
  border-color: rgba(229, 72, 77, 0.3);
}

.pt-audio.is-used .pt-audio-note {
  background: rgba(229, 72, 77, 0.12);
  color: var(--article-danger);
}

.pt-audio.is-used .pt-audio-note b {
  color: var(--article-danger);
}

.pt-item-q {
  font-weight: 700;
  line-height: 1.8;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.pt-options {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.pt-options.is-compact {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.pt-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--article-card-border);
  border-radius: 7px;
  background: var(--article-surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.pt-option:hover {
  border-color: var(--article-primary);
}

.pt-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.pt-option-letter {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--article-card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--article-primary);
  background: var(--article-surface);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pt-option-text {
  flex: 1;
  min-width: 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.pt-option.is-selected,
.pt-option:has(input:checked) {
  border-color: var(--article-primary);
  background: var(--article-surface-3);
}

.pt-option.is-selected .pt-option-letter,
.pt-option:has(input:checked) .pt-option-letter {
  background: var(--article-primary);
  border-color: var(--article-primary);
  color: #fff;
}

.pt-option:has(input:focus-visible) {
  outline: 2px solid var(--article-accent);
  outline-offset: 2px;
}

/* 送出區 */
.pt-submit-box {
  background: var(--article-surface);
  border: 1px solid var(--article-card-border);
  border-radius: 10px;
  padding: 26px 20px;
  text-align: center;
  margin-top: 10px;
}

.pt-submit-state {
  font-size: 17px;
  font-weight: 700;
  color: var(--article-ink);
  margin-bottom: 6px;
}

.pt-submit-state b {
  color: var(--article-warm);
}

.pt-submit-state.is-done b {
  color: var(--article-success);
}

.pt-submit-note {
  color: var(--article-muted);
  font-size: 15px;
  margin-bottom: 16px;
}

.pt-submit-note.is-final {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 7px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--article-warm);
  font-weight: 600;
  text-align: left;
}

.pt-submit-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------------------------------------------
   結果頁
   --------------------------------------------- */
.pt-result-hero {
  display: flex;
  align-items: center;
  gap: 30px;
  background: linear-gradient(120deg, var(--article-primary), var(--article-primary-dark));
  border-radius: 10px;
  padding: 32px 36px;
  color: #fff;
  margin-bottom: 20px;
}

.pt-result-ring {
  flex: 0 0 auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(#fff calc(var(--pt-score, 0) * 1%), rgba(255, 255, 255, 0.18) 0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-result-ring-inner {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--article-primary-dark);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  line-height: 112px;
}

.pt-result-num {
  font-size: 46px;
  font-weight: 700;
}

.pt-result-unit {
  font-size: 16px;
  opacity: 0.85;
}

.pt-result-info {
  flex: 1;
  min-width: 0;
}

.pt-result-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 14px;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.pt-result-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #fff;
}

.pt-result-toeic {
  margin: 0 0 10px;
  font-size: 16px;
  opacity: 0.9;
}

.pt-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 10px;
  opacity: 0.92;
  font-size: 16px;
}

.pt-result-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pt-result-note {
  margin: 0;
  font-size: 14px;
  opacity: 0.75;
}

.pt-result-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.pt-result-section {
  background: var(--article-surface);
  border: 1px solid var(--article-card-border);
  border-radius: 10px;
  padding: 16px 18px;
}

.pt-result-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.pt-result-section-name {
  font-size: 15px;
  color: var(--article-muted);
}

.pt-result-section-rate {
  font-size: 15px;
  font-weight: 700;
  color: var(--article-primary);
}

.pt-result-section-score {
  font-size: 24px;
  font-weight: 700;
  color: var(--article-primary);
  margin: 2px 0 10px;
}

.pt-result-section-score small {
  font-size: 15px;
  font-weight: 400;
  color: var(--article-muted);
}

.pt-result-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--article-surface-3);
  overflow: hidden;
}

.pt-result-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--article-primary);
}

/* 能力分析圖表 */
.pt-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.pt-chart-box {
  position: relative;
  width: 100%;
  height: 300px;
}

.pt-chart-box canvas {
  max-width: 100%;
}

.pt-chart-legend {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.pt-chart-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--article-muted);
}

.pt-chart-legend li b {
  color: var(--article-ink);
  min-width: 78px;
}

.pt-chart-legend li span {
  margin-left: auto;
  font-weight: 700;
  color: var(--article-primary);
  white-space: nowrap;
}

.pt-chart-legend .pt-legend-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--article-surface-3);
  overflow: hidden;
}

.pt-chart-legend .pt-legend-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--article-primary);
}

/* 文字分析 */
.pt-analysis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.pt-analysis-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.pt-analysis-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 7px;
  background: var(--article-surface-2);
  font-size: 15px;
}

.pt-analysis-list li i {
  flex: 0 0 auto;
}

.pt-analysis-list li b {
  flex: 1;
  min-width: 0;
}

.pt-analysis-list li span {
  font-weight: 700;
  white-space: nowrap;
}

.pt-analysis.is-strong .pt-analysis-list li i,
.pt-analysis-strong li i,
.pt-analysis-strong li span {
  color: var(--article-success);
}

.pt-analysis-weak li i,
.pt-analysis-weak li span {
  color: var(--article-warm);
}

/* 逐題檢討 */
.pt-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pt-filter button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--article-card-border);
  background: var(--article-surface);
  color: var(--article-muted);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.pt-filter button:hover,
.pt-filter button.is-active {
  border-color: var(--article-primary);
  background: var(--article-surface-3);
  color: var(--article-primary);
}

.pt-filter button[data-filter='wrong'].is-active {
  border-color: var(--article-danger);
  color: var(--article-danger);
  background: rgba(229, 72, 77, 0.1);
}

.pt-filter button[data-filter='correct'].is-active {
  border-color: var(--article-success);
  color: var(--article-success);
  background: rgba(34, 160, 107, 0.1);
}

.pt-filter-empty {
  background: var(--article-surface);
  border: 1px dashed var(--article-card-border);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  color: var(--article-muted);
  font-size: 16px;
}

.pt-review-group[hidden],
.pt-review[hidden],
.pt-filter-empty[hidden] {
  display: none;
}

.pt-review-section {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  margin: 20px 0 10px;
}

.pt-review-section i {
  color: var(--article-primary);
}

.pt-review {
  background: var(--article-surface);
  border: 1px solid var(--article-card-border);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.pt-review.is-correct {
  border-left-color: var(--article-success);
}

.pt-review.is-wrong {
  border-left-color: var(--article-danger);
}

.pt-review-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 8px;
}

.pt-review-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--article-surface-3);
  color: var(--article-muted);
  font-size: 15px;
  font-weight: 700;
}

.pt-review-type {
  font-size: 14px;
  color: var(--article-muted);
}

.pt-review-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.pt-review.is-correct .pt-review-flag {
  background: rgba(34, 160, 107, 0.12);
  color: var(--article-success);
}

.pt-review.is-wrong .pt-review-flag {
  background: rgba(229, 72, 77, 0.12);
  color: var(--article-danger);
}

.pt-review-passage {
  background: var(--article-surface-2);
  border-radius: 6px;
  padding: 10px 12px;
  line-height: 1.8;
  font-size: 15px;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.pt-review-image img {
  display: block;
  max-width: 100%;
  max-height: 260px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.pt-review-audio {
  display: block;
  width: 100%;
  max-width: 360px;
  height: 40px;
  margin-bottom: 10px;
}

.pt-review-q {
  line-height: 1.8;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.pt-review-row {
  display: flex;
  gap: 10px;
  font-size: 16px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--article-surface-2);
  margin-top: 6px;
  line-height: 1.7;
}

.pt-review-row.is-answer {
  background: rgba(34, 160, 107, 0.08);
}

.pt-review-key {
  flex: 0 0 74px;
  color: var(--article-muted);
  white-space: nowrap;
}

.pt-review-val {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pt-review-row.is-answer .pt-review-val {
  color: var(--article-success);
  font-weight: 700;
}

.pt-review-explain {
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 3px solid var(--article-primary);
  background: var(--article-surface-2);
  border-radius: 0 6px 6px 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--article-ink);
}

.pt-review-transcript {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--article-muted);
  white-space: pre-line;
}

.pt-review-transcript summary {
  cursor: pointer;
  color: var(--article-primary);
  font-weight: 700;
}

/* 推薦文章 */
.pt-rec {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--article-line);
  color: inherit;
  text-decoration: none;
}

.pt-rec:hover {
  color: inherit;
}

.pt-rec:hover .pt-rec-title {
  color: var(--article-primary);
}

.pt-rec:last-of-type {
  border-bottom: 0;
}

.pt-rec-cover {
  flex: 0 0 72px;
  width: 72px;
  height: 54px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--article-surface-3);
}

.pt-rec-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pt-rec-body {
  flex: 1;
  min-width: 0;
}

.pt-rec-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 13px;
  color: var(--article-muted);
  margin-bottom: 4px;
}

.pt-rec-level {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--article-surface-3);
}

.pt-rec-level-1 { color: var(--level-1); }
.pt-rec-level-2 { color: var(--level-2); }
.pt-rec-level-3 { color: var(--level-3); }
.pt-rec-level-4 { color: var(--level-4); }

.pt-rec-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.pt-result-actions {
  display: flex;
  flex-direction: column;
}

/* ---------------------------------------------
   我的程度測驗（會員中心）
   --------------------------------------------- */
.pt-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.pt-stat {
  background: var(--article-surface);
  border: 1px solid var(--article-card-border);
  border-radius: 10px;
  padding: 16px 18px;
}

.pt-stat-name {
  font-size: 14px;
  color: var(--article-muted);
  margin-bottom: 4px;
}

.pt-stat-num {
  font-size: 26px;
  font-weight: 700;
  color: var(--article-primary);
}

.pt-stat-num small {
  font-size: 14px;
  font-weight: 400;
  color: var(--article-muted);
}

.pt-table-wrap {
  overflow-x: auto;
}

.pt-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--article-surface);
  border: 1px solid var(--article-card-border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 15px;
}

.pt-table th,
.pt-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--article-line);
  text-align: left;
  white-space: nowrap;
}

.pt-table th {
  background: var(--article-surface-2);
  color: var(--article-muted);
  font-weight: 700;
  font-size: 14px;
}

.pt-table tr:last-child td {
  border-bottom: 0;
}

.pt-table .pt-table-score {
  font-weight: 700;
  color: var(--article-primary);
  font-size: 17px;
}

.pt-table a {
  color: var(--article-primary);
  font-weight: 700;
}

.pt-side-nav {
  display: grid;
  gap: 4px;
}

.pt-side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--article-ink);
  text-decoration: none;
  font-size: 15px;
}

.pt-side-link:hover,
.pt-side-link.active {
  background: var(--article-surface-3);
  color: var(--article-primary);
}

.pt-side-link i {
  width: 18px;
  text-align: center;
  color: var(--article-primary);
}

.pt-pagination {
  margin-top: 16px;
}

/* ---------------------------------------------
   響應式
   --------------------------------------------- */
@media (max-width: 1100px) {
  .pt-main {
    grid-template-columns: 1fr;
    grid-template-areas:
      'main'
      'side';
  }

  .pt-col-side {
    position: static;
  }
}

@media (max-width: 768px) {
  .pt-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 24px;
  }

  .pt-hero-icon {
    display: none;
  }

  .pt-parts,
  .pt-steps,
  .pt-charts,
  .pt-analysis,
  .pt-stats {
    grid-template-columns: 1fr;
  }

  .pt-item {
    padding: 16px;
  }

  .pt-result-hero {
    flex-direction: column;
    text-align: center;
    padding: 26px 20px;
  }

  .pt-result-meta {
    justify-content: center;
  }

  .pt-result-sections {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
  }

  .pt-review-key {
    flex-basis: 64px;
  }
}

@media (max-width: 560px) {
  .pt-hero {
    padding: 24px 18px;
  }

  .pt-hero-title {
    font-size: 24px;
  }

  .pt-hero-desc {
    font-size: 16px;
  }

  .pt-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'name timer'
      'progress progress'
      'track track'
      'steps steps';
    padding: 10px 14px;
    column-gap: 10px;
    row-gap: 6px;
    border-radius: 8px;
  }

  .pt-bar-name {
    font-size: 16px;
  }

  .pt-bar-progress {
    justify-content: space-between;
  }

  .pt-bar-timer {
    font-size: 16px;
    padding: 3px 10px;
  }

  .pt-option {
    padding: 10px 12px;
    gap: 10px;
  }

  .pt-submit-box {
    padding: 22px 16px;
  }

  .pt-submit-actions {
    flex-direction: column;
  }

  .pt-submit-actions .pt-btn {
    width: 100%;
  }

  .pt-result-ring {
    width: 124px;
    height: 124px;
  }

  .pt-result-ring-inner {
    width: 98px;
    height: 98px;
    line-height: 98px;
  }

  .pt-result-num {
    font-size: 40px;
  }

  .pt-result-title {
    font-size: 24px;
  }

  .pt-result-sections {
    grid-template-columns: 1fr;
  }

  .pt-review {
    padding: 12px 14px;
  }

  .pt-review-row {
    flex-direction: column;
    gap: 2px;
  }

  .pt-review-key {
    flex-basis: auto;
    font-size: 14px;
  }

  .pt-review-flag {
    margin-left: 0;
  }

  .pt-chart-box {
    height: 260px;
  }
}

/* 列印：只留題目與結果，隱藏操作列 */
@media print {
  .pt-bar,
  .pt-submit-box,
  .pt-filter,
  .pt-col-side,
  .pt-crumb {
    display: none !important;
  }

  .pt-main {
    grid-template-columns: 1fr;
    grid-template-areas: 'main';
  }

  .pt-page {
    background: #fff;
    padding: 0;
  }
}
