/* Claude 連接器文章的互動區：挑選器、Playwright 分頁、小測驗、常見問題 */
.cc-picker, .cc-quiz, .cc-tabs, .cc-faq-list {
  --cc-ink: #17211f;
  --cc-cream: #fff8e8;
  --cc-mint: #c6f0d8;
  --cc-mint-deep: #5fcf95;
  --cc-butter: #ffeda6;
  --cc-peach: #ffd6c0;
  --cc-sky: #cfe5ff;
  --cc-lav: #e2d8ff;
  --cc-straw: #ffd2dc;
  --cc-red: #d9534f;
  --cc-round: "Chiron GoRound TC", "PingFang TC", "Noto Sans TC", sans-serif;
  --cc-hand: "Iansui", "Chiron GoRound TC", "PingFang TC", cursive;
}

.article-content h2[id], #picker { scroll-margin-top: 96px; }

/* ---------- 共用：按得下去的按鈕 ---------- */
.cc-chip, .cc-seg button, .cc-q-opts button, .cc-tablist [role="tab"], .cc-btn, .cc-again, .cc-mini-copy {
  font: inherit;
  font-weight: 700;
  color: var(--cc-ink);
  background: #fff;
  border: 2.5px solid var(--cc-ink);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--cc-ink);
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, background-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.cc-chip:active, .cc-seg button:active, .cc-q-opts button:active:not(:disabled), .cc-tablist [role="tab"]:active, .cc-btn:active, .cc-again:active, .cc-mini-copy:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--cc-ink);
}
.cc-chip:focus-visible, .cc-seg button:focus-visible, .cc-q-opts button:focus-visible, .cc-tablist [role="tab"]:focus-visible,
.cc-btn:focus-visible, .cc-again:focus-visible, .cc-all:focus-visible, .cc-done input:focus-visible, .cc-faq summary:focus-visible, .cc-mini-copy:focus-visible {
  outline: 3px solid #2f7de1;
  outline-offset: 3px;
}

/* ---------- 標題：手畫螢光筆 ---------- */
.article-content .cc-title {
  font-family: var(--cc-round);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.4;
  letter-spacing: .01em;
  color: var(--cc-ink);
  margin: 0 70px 4px 0;
}
.cc-hl {
  padding: 0 4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 11 C 40 5, 92 14, 132 8 S 188 7, 198 10 L 196 18 C 150 14, 82 19, 4 17 Z' fill='%23ffe066'/%3E%3C/svg%3E") no-repeat 0 92% / 100% .62em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- 3D 表情貼紙 ---------- */
.cc-sticker {
  position: absolute;
  top: -28px;
  right: 18px;
  width: 74px;
  height: 74px;
  transform: rotate(8deg);
  animation: cc-wobble 3.4s ease-in-out infinite;
  filter: drop-shadow(0 4px 0 rgba(23, 33, 31, .12));
}
.cc-sticker:hover { animation: cc-hop .5s ease; }
@keyframes cc-wobble {
  0%, 100% { transform: rotate(8deg); }
  50% { transform: rotate(-6deg) translateY(-3px); }
}
@keyframes cc-hop {
  0% { transform: rotate(8deg); }
  40% { transform: translateY(-12px) scale(1.12) rotate(-6deg); }
  100% { transform: rotate(8deg); }
}

/* ---------- 挑選器 ---------- */
.cc-picker {
  position: relative;
  margin: 22px 0 6px;
  padding: 30px 26px 26px;
  background: var(--cc-cream);
  border: 2.5px solid var(--cc-ink);
  border-radius: 26px;
}
.article-content .cc-picker p { color: var(--cc-ink); font-size: 16px; line-height: 1.7; margin: 0; }
.article-content .cc-picker .cc-lead { color: #44524e; }

.cc-step { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.cc-step legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin-bottom: 12px;
  font-family: var(--cc-round);
  font-weight: 800;
  font-size: 18px;
  color: var(--cc-ink);
}
.cc-step legend small, .cc-tablist [role="tab"] small {
  font-family: var(--cc-hand);
  font-weight: 400;
  font-size: 17px;
  color: var(--cc-red);
}
.cc-num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border: 2.5px solid var(--cc-ink);
  border-radius: 50%;
  background: #fff;
  font-family: var(--cc-round);
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  color: var(--cc-ink);
}

.cc-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.cc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  font-size: 16px;
  line-height: 1.35;
  text-align: left;
}
.cc-chip img {
  width: 32px;
  height: 32px;
  flex: none;
  padding: 2px;
  border-radius: 9px;
  background: #fff;
}
.cc-chip[data-need="perplexity"] { --chip: var(--cc-sky); }
.cc-chip[data-need="firecrawl"] { --chip: var(--cc-peach); }
.cc-chip[data-need="posthog"] { --chip: var(--cc-butter); }
.cc-chip[data-need="playwright"] { --chip: var(--cc-mint); }
.cc-chip[data-need="composio"] { --chip: var(--cc-lav); }
.cc-chip[aria-pressed="true"] {
  background: var(--chip);
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--cc-ink);
}
.cc-chip::after {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  margin-left: 2px;
  border: 2.5px solid var(--cc-ink);
  border-radius: 6px;
  background: #fff;
}
.cc-chip[aria-pressed="true"]::after {
  background: var(--cc-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5 L8.5 15 L16 5.5' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat;
}
.cc-all {
  margin: 12px 0 0 2px;
  padding: 2px 0;
  border: 0;
  background: none;
  font-family: var(--cc-hand);
  font-size: 19px;
  color: #2f6f5f;
  text-decoration: underline wavy rgba(47, 111, 95, .55);
  text-underline-offset: 5px;
  cursor: pointer;
}

.cc-seg { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.cc-seg:last-child { margin-bottom: 0; }
.cc-seg-label { align-self: center; min-width: 4.5em; font-weight: 800; font-size: 14px; color: #52615c; }
.cc-seg button { padding: 8px 14px; font-size: 15px; border-radius: 14px; }
.cc-seg button[aria-pressed="true"] {
  background: var(--cc-mint);
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--cc-ink);
}

/* 結果 */
.cc-result {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 2.5px dashed rgba(23, 33, 31, .3);
}
.cc-empty { display: flex; align-items: center; gap: 12px; }
.cc-empty img { width: 54px; height: 54px; flex: none; }
.article-content .cc-empty p {
  font-family: var(--cc-hand);
  font-size: 21px;
  line-height: 1.45;
  color: var(--cc-red);
  transform: rotate(-1.5deg);
}
.cc-empty svg { width: 54px; height: 40px; flex: none; margin-top: -26px; }

.cc-result-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; }
.article-content .cc-result-head h3 {
  margin: 0;
  font-family: var(--cc-round);
  font-weight: 800;
  font-size: 21px;
  color: var(--cc-ink);
}
.article-content .cc-result-head .cc-count { font-family: var(--cc-round); font-weight: 800; font-size: 16px; }
.cc-bar {
  height: 18px;
  margin: 10px 0 18px;
  border: 2.5px solid var(--cc-ink);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}
.cc-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cc-mint-deep);
  transition: width .35s ease;
}
.cc-bar span.has-fill { border-right: 2.5px solid var(--cc-ink); }

.article-content .cc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.article-content .cc-list > li { margin: 0; padding-left: 0; }
.article-content .cc-list > li::before, .article-content .cc-list > li::marker { content: none; }
.cc-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 2.5px solid var(--cc-ink);
  border-radius: 20px;
  transition: background-color .2s ease;
}
.cc-item.is-done { background: #effaf3; }
.cc-item.is-blocked { background: #f3f3ef; }
.cc-item.is-blocked .cc-logo { filter: grayscale(.7); }
.cc-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 2.5px solid var(--cc-ink);
  border-radius: 16px;
  background: var(--item);
}
.cc-logo img { width: 40px; height: 40px; border-radius: 8px; background: #fff; padding: 2px; }
.cc-order {
  position: absolute;
  top: -11px;
  left: -11px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cc-ink);
  color: #fff;
  font: 800 13px/26px var(--cc-round);
  text-align: center;
}
.cc-item-body { min-width: 0; }
.article-content .cc-item p { margin: 0; font-size: 15px; line-height: 1.65; color: #34433f; }
.article-content .cc-item .cc-name { font-family: var(--cc-round); font-weight: 800; font-size: 19px; color: var(--cc-ink); }
.article-content .cc-item .cc-what { color: var(--cc-ink); }
.cc-meta { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 4px; }
.article-content .cc-meta p { font-size: 14px; color: #52615c; }
.cc-meta b { color: var(--cc-ink); font-weight: 800; }
.article-content .cc-item .cc-hand {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--cc-hand);
  font-size: 19px;
  line-height: 1.4;
  color: var(--cc-red);
  transform: rotate(-1.5deg);
}
.article-content .cc-notes { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.article-content .cc-notes li {
  margin: 0;
  padding: 7px 11px;
  border-radius: 11px;
  background: var(--cc-butter);
  font-size: 14px;
  line-height: 1.6;
  color: var(--cc-ink);
}
.article-content .cc-notes li::before, .article-content .cc-notes li::marker { content: none; }
.article-content .cc-notes li.is-stop { background: var(--cc-straw); font-weight: 700; }
.cc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px; }
.cc-btn {
  display: inline-block;
  padding: 6px 14px;
  font-size: 14px;
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--cc-ink);
  background: var(--cc-butter);
}
.article-content a.cc-btn, .article-content a.cc-btn:visited { color: var(--cc-ink); text-decoration: none; }
.cc-done { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--cc-ink); cursor: pointer; user-select: none; }
.cc-done input {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: 0;
  border: 2.5px solid var(--cc-ink);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.cc-done input:checked {
  background: var(--cc-mint-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5 L8.5 15 L16 5.5' fill='none' stroke='%2317211f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 17px no-repeat;
}
.cc-try {
  margin-top: 12px;
  padding: 12px 14px;
  border: 2px dashed var(--cc-ink);
  border-radius: 14px;
  background: #fff;
}
.article-content .cc-try .cc-try-label { font-family: var(--cc-hand); font-size: 18px; color: #2f6f5f; }
.article-content .cc-try .cc-try-text { font-weight: 700; color: var(--cc-ink); margin: 2px 0 8px; }
.cc-mini-copy { padding: 4px 12px; font-size: 13px; border-radius: 10px; box-shadow: 0 3px 0 var(--cc-ink); background: var(--cc-mint); }

.cc-warn-box, .cc-finish {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 2.5px solid var(--cc-ink);
  border-radius: 18px;
}
.cc-warn-box { background: var(--cc-straw); }
.cc-finish { background: var(--cc-mint); grid-template-columns: 64px 1fr; }
.cc-warn-box img { width: 48px; height: 48px; }
.cc-finish img { width: 64px; height: 64px; animation: cc-pop .6s ease; }
.article-content .cc-warn-box p, .article-content .cc-finish p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--cc-ink); }
.article-content .cc-finish p b { font-family: var(--cc-round); font-size: 18px; }
@keyframes cc-pop {
  0% { transform: scale(.4) rotate(-20deg); }
  70% { transform: scale(1.15) rotate(6deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ---------- 對照表的名稱連結 ---------- */
.guide-table-wrap tbody th a { color: var(--green-800, #1d4b40); text-decoration: underline wavy rgba(47, 111, 95, .45); text-underline-offset: 4px; }

/* ---------- Playwright 安裝分頁 ---------- */
.cc-tabs { margin: 4px 0 6px; }
.cc-tablist { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.cc-tablist [role="tab"] {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  font-size: 15px;
  border-radius: 14px;
}
.cc-tablist [role="tab"] small { font-size: 16px; }
.cc-tablist [role="tab"][aria-selected="true"] {
  background: var(--cc-mint);
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--cc-ink);
}
.article-content .cc-tabpanel > p { margin: 0 0 4px; }
.article-content .cc-tabpanel .prompt-block { margin: 10px 0 4px; }

/* ---------- 小測驗 ---------- */
.cc-quiz {
  position: relative;
  margin: 18px 0 6px;
  padding: 30px 24px 22px;
  background: #eef6ff;
  border: 2.5px solid var(--cc-ink);
  border-radius: 26px;
}
.cc-q { padding: 16px 0; border-top: 2px dashed rgba(23, 33, 31, .22); }
.cc-quiz .cc-title + .cc-q { border-top: 0; padding-top: 12px; }
.article-content .cc-q-text {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.6;
  color: var(--cc-ink);
}
.cc-q-text .cc-num { margin-top: -1px; }
.cc-q-opts { display: flex; flex-wrap: wrap; gap: 10px; padding-left: 40px; }
.cc-q-opts button { padding: 8px 20px; font-size: 16px; border-radius: 14px; }
.cc-q-opts button:disabled { cursor: default; }
.cc-q-opts button.is-right { background: var(--cc-mint); }
.cc-q-opts button.is-wrong { background: var(--cc-straw); animation: cc-shake .35s ease; }
.cc-q.is-answered .cc-q-opts button:not(.is-right):not(.is-wrong) { opacity: .5; }
.article-content .cc-q-why {
  margin: 12px 0 0 40px;
  padding: 10px 13px;
  border: 2px solid var(--cc-ink);
  border-radius: 13px;
  background: #fff;
  font-size: 15px;
  line-height: 1.65;
  color: var(--cc-ink);
}
.cc-q-why b.is-ok { color: #1f7a4d; }
.cc-q-why b.is-no { color: #c0392b; }
@keyframes cc-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.cc-score {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  padding: 14px 16px;
  border: 2.5px solid var(--cc-ink);
  border-radius: 18px;
  background: #fff;
}
.cc-score img { width: 58px; height: 58px; flex: none; animation: cc-pop .6s ease; }
.article-content .cc-score p { flex: 1 1 200px; margin: 0; font-size: 16px; font-weight: 800; color: var(--cc-ink); line-height: 1.6; }
.cc-again { padding: 6px 14px; font-size: 14px; border-radius: 12px; box-shadow: 0 3px 0 var(--cc-ink); background: var(--cc-butter); }

/* ---------- 常見問題：點開看答案 ---------- */
.cc-faq-list { display: grid; gap: 12px; }
.cc-faq {
  border: 2.5px solid var(--cc-ink);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}
.cc-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cc-faq summary::-webkit-details-marker { display: none; }
.article-content .cc-faq summary h3 {
  margin: 0;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--cc-ink);
}
.cc-faq summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border: 2.5px solid var(--cc-ink);
  border-radius: 50%;
  background: var(--cc-butter);
  font: 800 20px/1 var(--cc-round);
  color: var(--cc-ink);
  transition: transform .2s ease;
}
.cc-faq[open] summary { background: var(--cc-butter); border-bottom: 2.5px solid var(--cc-ink); }
.cc-faq[open] summary::after { transform: rotate(45deg); background: #fff; }
.article-content .cc-faq p { margin: 0; padding: 14px 16px 16px; font-size: 16px; }

/* ---------- 手機 ---------- */
@media (hover: hover) {
  .cc-chip:hover:not([aria-pressed="true"]), .cc-seg button:hover:not([aria-pressed="true"]),
  .cc-tablist [role="tab"]:hover:not([aria-selected="true"]), .cc-q-opts button:hover:not(:disabled) {
    background: #fffdf5;
    transform: translateY(-1px);
    box-shadow: 0 5px 0 var(--cc-ink);
  }
}
@media (max-width: 600px) {
  .cc-picker, .cc-quiz { padding: 28px 16px 18px; border-radius: 22px; }
  .article-content .cc-title { font-size: 22px; margin-right: 58px; }
  .cc-sticker { width: 62px; height: 62px; top: -24px; right: 10px; }
  .cc-chips { gap: 10px; }
  .cc-chip { width: 100%; }
  .cc-chip::after { margin-left: auto; }
  .cc-seg-label { width: 100%; min-width: 0; }
  .cc-item { grid-template-columns: 48px 1fr; gap: 12px; padding: 14px 12px; }
  .cc-logo { width: 48px; height: 48px; border-radius: 14px; }
  .cc-logo img { width: 34px; height: 34px; }
  .cc-q-opts { padding-left: 0; }
  .article-content .cc-q-why { margin-left: 0; }
  .cc-finish { grid-template-columns: 52px 1fr; }
  .cc-finish img { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-sticker, .cc-sticker:hover, .cc-finish img, .cc-score img, .cc-q-opts button.is-wrong { animation: none; }
  .cc-bar span { transition: none; }
}
