/* ══════════════════════════════════════════════════════
   Read 頁共用版面：what-is-geo、what-is-aio、faq、insights（索引；文章於 Task 13 接上）
   視覺 spec §5「閱讀版」：token、劃線系統、kicker、exhibit 框；不做頁碼與標註，內文寬 72ch。
   只用九個 deck token；scripts/check-deck-palette.mjs 會掃這支檔（css/pages/deck-*.css）。
   載入順序：components.css → deck.css → 本檔。
   ══════════════════════════════════════════════════════ */

body {
  background: var(--paper);
  color: var(--ink);
}

main {
  padding-top: var(--navbar-height);
}

/* 主容器：.read 由 deck.css 定寬（72ch），這裡只給上下留白 */
.read-page {
  padding-block: 72px 96px;
}

.read [id] {
  scroll-margin-top: calc(var(--navbar-height) + 16px);
}

/* ── 頁首：kicker → h1 → 引言 ── */
.read__kicker {
  display: block;
  font-family: var(--font-latin);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
  color: var(--ink-2);
}

.read .read__title {
  margin-top: 16px;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.read .read__lead {
  margin-top: 20px;
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink-2);
}

/* 每個 h2 段落的第一句答案：開頭就回答問題 */
.read .read__answer {
  font-weight: 700;
}

.read h2 {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.read ul.read__list,
.read ol.read__list {
  padding-left: 1.4em;
}

.read ul.read__list { list-style: disc; }
.read ol.read__list { list-style: decimal; }

.read ul.read__list li + li,
.read ol.read__list li + li {
  margin-top: 0.4em;
}

.read code {
  font-size: 0.9em;
  padding: 0 4px;
  border: 1px solid var(--rule);
  background: var(--white);
}

/* 本頁章節 */
.read__toc {
  margin-top: 32px;
  padding-top: 12px;
  border-top: 1px solid var(--ink);
  font-size: 14px;
}

.read__toc ol {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  counter-reset: toc;
}

.read__toc li {
  counter-increment: toc;
}

.read__toc li::before {
  content: counter(toc, decimal-leading-zero) "　";
  font-family: var(--font-latin);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.read__toc a {
  text-decoration: none;
}

.read__toc a:hover {
  text-decoration: underline;
}

/* ── exhibit 在內文裡 ── */
.read .exhibit {
  margin-top: 32px;
}

.read .exhibit h3:first-of-type {
  margin-top: 12px;
}

.read .exhibit p,
.read .exhibit li {
  font-size: 15px;
  line-height: 1.7;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 12px;
}

.read .deck-table th[scope="row"] {
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0;
  color: var(--ink);
  vertical-align: top;
}

/* ── 分界線「以下給行銷與技術人員」 ── */
.read .read__divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 72px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.read__divider::before,
.read__divider::after {
  content: "";
  flex: 1 1 auto;
  border-top: 1px solid var(--ink);
}

/* ── AI 回答示意面板 ── */
.ai-demo__q {
  margin-top: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
}

.read .ai-demo__a {
  margin-top: 14px;
  color: var(--ink);
}

.ai-demo__cites {
  margin-top: 12px;
  border-top: 1px solid var(--rule);
}

.read .ai-demo__cites li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
  padding: 8px 4px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}

.ai-demo__cites li span:last-child {
  flex: none;
  color: var(--ink-2);
}

.ai-demo__cites .is-you {
  background: var(--highlight);
  font-weight: 700;
}

.ai-demo__cites .is-you span:last-child {
  color: var(--ink);
}

/* 遮蔽的答案文字（示意） */
.redacted {
  display: inline-block;
  width: var(--w, 80px);
  height: 0.7em;
  background: var(--rule);
  vertical-align: middle;
}

/* ── 檢查清單（8 個檢查點、AIO 自我檢查） ── */
.checklist {
  margin-top: 12px;
}

.read .checklist__item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 4px 8px;
  margin-top: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.checklist__item::before {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  background-color: currentColor;
  -webkit-mask: var(--mk-check) center / contain no-repeat;
  mask: var(--mk-check) center / contain no-repeat;
  color: var(--ink);
}

.checklist--numbered {
  counter-reset: check;
}

.checklist--numbered .checklist__item {
  counter-increment: check;
}

.checklist--numbered .checklist__item::before {
  content: counter(check, decimal-leading-zero);
  font-size: 13px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.checklist__item strong {
  display: block;
  font-weight: 700;
}

.checklist__item p {
  grid-column: 2;
  margin-top: 2px;
}

.checklist__group {
  margin-top: 20px;
  font-size: 15px;
  font-weight: 700;
}

/* ── 名詞對照 ── */
.terms {
  margin-top: 8px;
}

.terms div {
  display: grid;
  grid-template-columns: 6em minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.terms dt {
  font-family: var(--font-latin);
  font-weight: 700;
  color: var(--ink);
}

.terms dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

/* ── 編號步驟／條件（AIO） ── */
.steps-list {
  counter-reset: step;
}

.read .steps-list > li {
  counter-increment: step;
  position: relative;
  margin-top: 0;
  padding: 14px 0 14px 48px;
  border-bottom: 1px solid var(--rule);
}

.steps-list > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 14px;
  left: 0;
  font-family: var(--font-latin);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.steps-list h3 {
  font-size: 16px;
  font-weight: 700;
}

.read .steps-list h3 {
  margin-top: 0;
}

.read .steps-list p {
  margin-top: 4px;
  font-size: 15px;
}

/* ── 研究段的來源行 ── */
.read .read__source {
  font-family: var(--font-latin);
  font-size: 12px;
  font-stretch: 85%;
  line-height: 1.5;
  color: var(--ink-2);
}

.read .read__source a {
  color: inherit;
}

/* ── FAQ 群組標題 ── */
.read .faq-group > h2 {
  margin-top: 0;
}

.read .faq-group > .read__kicker + h2 {
  margin-top: 8px;
}

.read .faq-group > p {
  margin-top: 8px;
  color: var(--ink-2);
}

.read .faq-group details p {
  margin-top: 0;
}

/* ── 文章列表（insights 索引） ── */
.post-list {
  margin-top: 40px;
  border-top: 1px solid var(--ink);
}

.read .post-list > li {
  margin-top: 0;
}

.post {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}

.read .post h2 {
  margin-top: 8px;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
}

.read .post h2 a {
  text-decoration: none;
}

.read .post h2 a:hover {
  text-decoration: underline;
}

.read .post__sub {
  margin-top: 6px;
  font-weight: 600;
  color: var(--ink);
}

.read .post__desc {
  margin-top: 6px;
  color: var(--ink-2);
}

.read .post__more {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
}

/* ── 文末 exhibit 式 CTA ── */
.read .read-cta {
  margin-top: 72px;
}

.read .read-cta h2 {
  margin-top: 12px;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

/* deck.css 的 .read a（墨藍底線字）比 .btn 更具體，按鈕在內文裡要蓋回來 */
.read .btn {
  color: var(--on-ink);
  text-decoration: none;
}

.read .btn--outline,
.read .btn--outline:hover {
  color: var(--ink);
}

.read .read-cta .btn {
  margin-top: 20px;
}

.read-cta__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.read .read-cta__links .btn {
  margin-top: 0;
}

.read .read-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 20px;
}

.read .read-cta__actions .btn {
  margin-top: 0;
}

@media (max-width: 768px) {
  .read-page {
    padding-block: 40px 64px;
  }

  .read .read__lead {
    font-size: 17px;
  }

  .terms div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .read .read-cta .btn {
    white-space: normal;
    height: auto;
    min-height: 48px;
    padding-block: 12px;
    text-align: center;
  }
}

/* ══════════════════════════════════════════════════════
   法務頁（terms／privacy／refund）與研究文章（insights/*）
   Task 13：只換樣式載入，文字不動。沿用既有 legal-* 與文章類別名，
   改成 deck 的「劃線、不上色、不圓角、不陰影」。
   會帶 backdrop-filter 的舊類別（legal-panel、glass-card、pricing-card、study-evidence）
   在標記裡已換成下方的 *-deck 類別，守衛不允許重設 backdrop-filter。
   ══════════════════════════════════════════════════════ */

.read--wide {
  width: min(var(--deck-max), 100% - 2 * var(--deck-gutter));
}

.read .container {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

.read .section {
  padding: 0;
  margin-top: 56px;
  background: none;
}

.read .section-header {
  margin-bottom: 24px;
  text-align: left;
}

.read .section-header h2 {
  margin-top: 12px;
  margin-bottom: 0;
}

.read .section-header p {
  max-width: none;
  margin: 12px 0 0;
  font-size: 16px;
  color: var(--ink-2);
}

/* 舊 badge → kicker */
.read .badge,
.read .badge--research {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink-2);
  font-family: var(--font-latin);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: none;
}

.read .badge--research::before {
  content: none;
}

.read .gradient-text {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: inherit;
}

/* ── 法務頁 ── */
.read .legal-hero {
  padding-top: 72px;
}

.read .legal-hero h1 {
  margin-top: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
}

.read .legal-hero .legal-hero__date {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-2);
}

.read .legal-shell {
  margin-top: 0;
  padding-bottom: 96px;
  gap: 48px;
}

.read .legal-panel-deck {
  padding: 16px 0 20px;
  border-top: 1px solid var(--ink);
}

.read .legal-panel-deck + .legal-panel-deck {
  margin-top: 24px;
}

.read .legal-panel__eyebrow {
  margin-top: 0;
  margin-bottom: 4px;
  font-family: var(--font-latin);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: none;
  color: var(--ink-2);
}

.read .legal-panel__title {
  margin-top: 0;
  font-size: 1.0625rem;
  color: var(--ink);
}

.read .legal-panel__body {
  font-size: 15px;
  color: var(--ink-2);
}

.read .legal-keypoints li {
  font-size: 15px;
  color: var(--ink);
}

.read .legal-keypoints li::before {
  width: 6px;
  height: 6px;
  border-radius: 0;
  background: var(--ink);
  box-shadow: none;
}

.read .legal-toc a,
.read .legal-crosslinks a {
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: none;
  color: var(--ink);
  text-decoration: none;
  transition: none;
  transform: none;
}

.read .legal-toc a:hover,
.read .legal-toc a:focus-visible,
.read .legal-crosslinks a:hover,
.read .legal-crosslinks a:focus-visible {
  border-color: var(--ink);
  background: var(--highlight);
  color: var(--ink);
  transform: none;
}

.read .legal-crosslinks a span {
  color: var(--ink-2);
}

.read .legal-crosslinks a[aria-current="page"] {
  border-color: var(--ink);
  background: var(--highlight);
  box-shadow: none;
}

.read .legal-lead {
  margin-bottom: 8px;
  padding: 0 0 24px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: none;
  overflow: visible;
}

.legal-lead::after {
  content: none;
}

.read .legal-intro {
  max-width: none;
  font-size: 17px;
  color: var(--ink);
}

.read .legal-meta span {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: var(--font-latin);
  font-size: 13px;
  color: var(--ink-2);
}

.read .legal-meta span + span::before {
  content: "／";
  margin-right: 0.75rem;
}

.read .legal-section {
  grid-template-columns: 3.5rem minmax(0, 1fr);
  margin-top: 0;
  border-bottom: 1px solid var(--rule);
}

.read .legal-section__num {
  width: auto;
  height: auto;
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--ink);
}

.read .legal-section h2 {
  margin-top: 0;
  color: var(--ink);
}

.read .legal-section p,
.read .legal-section ul,
.read .legal-section ol {
  color: var(--ink);
}

.read .legal-section li::marker {
  color: var(--ink);
}

.read .legal-section a {
  color: var(--ink);
}

.read .legal-highlight {
  border: 0;
  border-left: 3px solid var(--ink);
  border-radius: 0;
  background: var(--highlight);
  color: var(--ink);
}

@media (max-width: 640px) {
  .read .legal-section {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── 研究文章（why-ai-cites-your-site） ── */
.read .page-hero {
  padding: 0;
  text-align: left;
  background: none;
  overflow: visible;
}

.read .page-hero__badge {
  margin-bottom: 0;
}

.read .page-hero h1 {
  margin-top: 16px;
  margin-bottom: 0;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.read .page-hero p {
  max-width: none;
  margin: 20px 0 0;
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink-2);
}

.read .page-hero p.article-subtitle {
  margin-top: 16px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
}

.read .article-subtitle strong {
  font-weight: 700;
}

.read .article-hero-stats,
.read .article-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  max-width: none;
  margin: 32px 0 0;
  padding: 0;
  border-top: 1px solid var(--ink);
  border-right: 0;
  border-bottom: 1px solid var(--rule);
  border-left: 0;
  background: none;
}

.read .article-hero-stat,
.read .article-stats__item {
  padding: 16px 16px 16px 0;
  text-align: left;
}

.read .article-hero-stat + .article-hero-stat,
.read .article-stats__item + .article-stats__item {
  padding-left: 16px;
  border-left: 1px solid var(--rule);
}

.read .article-hero-stat__number,
.read .article-stats .exhibit__stat {
  margin: 0;
  font-family: var(--font-latin);
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 800;
  font-stretch: 110%;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.read .article-hero-stat__label,
.read .article-stats .exhibit__caption {
  display: block;
  font-family: inherit;
  font-stretch: 100%;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}

.read .bento-grid,
.read .finding-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-top: 24px;
  border-top: 1px solid var(--ink);
}

.read .art-card {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  background: none;
}

.read .art-card .icon-box {
  display: none;
}

.read .art-card h3,
.read .finding-grid .art-card h3 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 1.125rem;
  text-align: left;
  color: var(--ink);
}

.read .art-card p,
.read .finding-grid .art-card p {
  margin-top: 6px;
  font-size: 15px;
  text-align: left;
  color: var(--ink-2);
}

.read .article-note {
  max-width: none;
  margin: 24px 0 0;
  font-size: 16px;
  color: var(--ink);
}

.read .article-source {
  margin-top: 12px;
  font-family: var(--font-latin);
  font-size: 12px;
  font-stretch: 85%;
  line-height: 1.5;
  color: var(--ink-2);
}

.read .research-table {
  width: 100%;
  margin: 20px 0 0;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.read .research-table th,
.read .research-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--rule);
}

.read .research-table thead th {
  background: none;
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-2);
}

.read .research-table tbody tr:hover {
  background: var(--highlight);
}

.read .research-table .metric-up,
.read .research-table .metric-down {
  color: var(--ink);
  font-weight: 700;
}

.read .research-table .metric-down::before,
.read .research-table .metric-up::before {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.3em;
  vertical-align: -0.05em;
  background-color: currentColor;
  -webkit-mask: var(--mk-down) center / contain no-repeat;
  mask: var(--mk-down) center / contain no-repeat;
}

.read .research-table .metric-up::before {
  -webkit-mask-image: var(--mk-up);
  mask-image: var(--mk-up);
}

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

.read .finding-deck {
  margin-top: 56px;
  padding: 24px 28px;
  border: 1px solid var(--ink);
  background: var(--white);
}

.read .finding-deck > .container {
  max-width: none;
  padding: 0;
  border: 0;
  background: none;
}

.read .finding-deck h2 {
  margin-top: 12px;
}

.read .finding-deck ul {
  margin-top: 12px;
  margin-bottom: 12px;
  padding-left: 1.4em;
  list-style: disc;
}

.read .finding-deck li + li {
  margin-top: 0.4em;
}

.read .study-evidence__cite {
  margin-top: 16px;
  font-family: var(--font-latin);
  font-size: 12px;
  color: var(--ink-2);
}

.read .article-services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: none;
  margin: 24px 0 0;
}

.read .plan-deck {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 28px;
  border: 1px solid var(--rule);
  background: var(--white);
}

.read .plan-deck--featured {
  border-color: var(--ink);
}

.read .plan-deck .pricing-card__name {
  margin-top: 12px;
  font-size: 1.25rem;
  color: var(--ink);
}

.read .plan-deck .pricing-card__price {
  margin-top: 8px;
  margin-bottom: 8px;
  font-family: var(--font-latin);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--ink);
}

.read .plan-deck .pricing-card__price span {
  font-size: 14px;
  color: var(--ink-2);
}

.read .plan-deck__desc {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--ink-2);
}

.read .plan-deck .pricing-card__features {
  margin: 0 0 20px;
  gap: 0;
  align-self: stretch;
}

.read .plan-deck .pricing-card__feature {
  margin-top: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink);
}

.read .plan-deck .pricing-card__feature svg {
  width: 14px;
  height: 14px;
  padding: 0;
  border-radius: 0;
  background: none;
  stroke: var(--ink);
}

.read .plan-deck .btn {
  margin-top: auto;
  align-self: stretch;
}

.read .cta-section {
  background: none;
  overflow: visible;
}

.read .cta-section__inner {
  padding: 0;
  text-align: left;
}

.read .cta-section p {
  max-width: none;
  margin: 12px 0 0;
  font-size: 16px;
  color: var(--ink-2);
}

.read .cta-section__buttons {
  justify-content: flex-start;
  gap: 12px 20px;
  margin-top: 20px;
}

.read .article-refs {
  margin-bottom: 96px;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}

.read .article-refs h2 {
  margin-top: 0;
  font-size: 1.125rem;
}

.read .article-refs p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-2);
}

@media (max-width: 768px) {
  .read .article-hero-stats,
  .read .article-stats,
  .read .article-services-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .read .article-hero-stat + .article-hero-stat,
  .read .article-stats__item + .article-stats__item {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }

  .read .finding-deck,
  .read .plan-deck {
    padding: 20px;
  }
}
