/* ===== Style 2 · article ===== */
.article-main {
  flex: 1;
  width: 100%;
}

.article-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 0;
}

.article-head {
  margin-bottom: 36px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.article-title {
  font-family: var(--font-sans);
  font-size: clamp(22px, 5.2vw, 32px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 14px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 13px;
  color: var(--muted);
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-meta-label {
  color: var(--aqua);
  font-weight: 600;
}

.content-segment {
  margin-bottom: 40px;
}

.segment-label {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--aqua);
}

.segment-image {
  width: 100%;
  margin-bottom: 16px;
  padding: 20px;
  background: var(--image-well);
  border: 1px solid var(--image-well-border);
  border-radius: var(--radius);
  box-shadow: 0 1px 6px rgba(42, 39, 36, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.segment-image img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
}

.segment-text {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-soft);
}

/* ===== Shop card ===== */
.amazon-shop-panel {
  margin: 0 0 18px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(42, 39, 36, 0.06);
}

.amazon-shop-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--aqua);
}

.amazon-shop-desc {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.amazon-shop-actions {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
}

.amazon-shop-btn {
  display: grid;
  grid-template-columns: 48px 1fr 24px;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  height: 54px;
  padding: 0 12px 0 0;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.amazon-shop-btn:last-child {
  border-bottom: none;
}

.amazon-shop-btn:hover {
  background: var(--accent-soft);
}

.amazon-shop-btn-region {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.amazon-shop-btn-copy {
  min-width: 0;
}

.amazon-shop-btn-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.amazon-shop-btn-sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.amazon-shop-btn-arrow {
  color: var(--accent);
  font-size: 14px;
}

.amazon-shop-note {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}

/* ===== Scorecard table (CMS-safe) ===== */
.facts-section {
  --table-border: #8f7da8;
  margin-bottom: 12px;
  padding: 20px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.facts-heading {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.table-wrap {
  overflow: hidden;
  margin-bottom: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

/* content3：模板仅用 .table-wrap，与 .facts-summary 共用同一套 CMS 排版 */
.facts-section > .table-wrap,
.table-wrap.facts-summary {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  margin-bottom: 0 !important;
  overflow: visible;
  font-size: 15px;
  line-height: 1.82;
  color: var(--color-ink-soft);
}

.facts-section > .table-wrap:not(:has(table)),
.table-wrap.facts-summary:not(:has(table)) {
  display: block;
  padding: 14px 16px !important;
  background: var(--bg-deep) !important;
  border-radius: 12px;
  border: none !important;
}

.facts-section > .table-wrap:has(table),
.table-wrap.facts-summary:has(table) {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 16px;
}

.facts-section > .table-wrap > p:has(+ table),
.table-wrap.facts-summary > p:has(+ table) {
  display: none !important;
}

.facts-section > .table-wrap:has(table) > table,
.table-wrap.facts-summary:has(table) > table {
  grid-row: 1;
  grid-column: 1;
  width: 100% !important;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 !important;
  background: var(--paper);
  /* collapse + overflow 会吃掉 table 外 border，用 inset 描边保证四边完整 */
  border: none !important;
  box-shadow: inset 0 0 0 2px var(--table-border-outer);
}

.table-wrap table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.5;
  border: none !important;
  height: auto !important;
}

.facts-section > .table-wrap > table[border] {
  border: none !important;
}

.table-wrap td,
.table-wrap th {
  padding: 10px 10px !important;
  border: 1px solid var(--table-border, var(--color-border-strong)) !important;
  color: var(--ink-soft);
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.table-wrap td[width],
.table-wrap th[width] {
  width: auto !important;
  min-width: 0;
}

.facts-section .table-wrap td[style],
.facts-section .table-wrap th[style],
.table-wrap td[style],
.table-wrap th[style] {
  border-color: var(--table-border, var(--color-border-strong)) !important;
  border-style: solid !important;
}

.table-wrap table span[style],
.table-wrap table strong span[style] {
  font-size: inherit !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.table-wrap td p,
.table-wrap th p {
  margin: 0;
}

.table-wrap thead tr td,
.table-wrap thead tr th,
.table-wrap tr.firstRow td,
.table-wrap tr.firstRow th,
.table-wrap table:not(:has(thead)) > tbody > tr:first-child td {
  background: var(--accent-soft) !important;
  color: var(--accent-deep) !important;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table-wrap thead tr td *,
.table-wrap thead tr th *,
.table-wrap tr.firstRow td *,
.table-wrap tr.firstRow th *,
.table-wrap table:not(:has(thead)) > tbody > tr:first-child td * {
  color: inherit !important;
  font-size: inherit !important;
}

.table-wrap table:has(thead) tbody tr td:first-child,
.table-wrap table:not(:has(thead)) > tbody > tr:not(:first-child) td:first-child {
  background: var(--paper);
  font-weight: 700;
  font-size: 12px;
  color: var(--ink);
  width: 28%;
}

.table-wrap table:has(thead) tbody tr td:nth-child(2),
.table-wrap table:has(thead) tbody tr td:nth-child(3),
.table-wrap table:not(:has(thead)) > tbody > tr:not(:first-child) td:nth-child(2),
.table-wrap table:not(:has(thead)) > tbody > tr:not(:first-child) td:nth-child(3) {
  background: var(--paper);
}

.facts-section > .facts-summary,
.facts-section > .table-wrap > table ~ p:last-child,
.facts-section > .table-wrap > p:last-child:only-child,
.table-wrap.facts-summary > table + p {
  margin: 0 !important;
  padding: 14px 16px !important;
  font-size: 15px;
  line-height: 1.82;
  color: var(--ink-soft);
  text-align: left !important;
  background: var(--bg-deep) !important;
  border-radius: 12px;
  min-height: 0 !important;
}

/* CMS 常在表格后插入仅含 &nbsp; 的空段落 */
.facts-section > .table-wrap > table + p:has(+ p),
.facts-section .table-wrap.facts-summary > p:empty,
.facts-section .table-wrap.facts-summary > p:has(> br:only-child),
.facts-section > .table-wrap > p:empty,
.facts-section > .table-wrap > p:has(> br:only-child) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

.facts-section > .table-wrap > p span[style],
.facts-section .table-wrap.facts-summary > p span[style] {
  display: inline;
  font-size: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
  background: transparent !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.facts-summary:not(.table-wrap) {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  padding: 14px 16px;
  background: var(--bg-deep);
  border-radius: 12px;
}

/* ===== Related ===== */
.related-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 20px 56px;
}

.related-heading {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.related-grid {
  display: flex;
  flex-direction: column;
}

.related-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.related-thumb {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: var(--image-well);
  border: 1px solid var(--image-well-border);
  box-shadow: 0 1px 4px rgba(42, 39, 36, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.related-thumb img {
  max-width: 58px;
  max-height: 58px;
  object-fit: contain;
}

.related-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.related-item:hover .related-title {
  color: var(--accent);
}

@media (max-width: 520px) {
  .table-wrap table {
    font-size: 11px;
  }

  .table-wrap td {
    padding: 8px 6px !important;
  }

  .table-wrap table:not(:has(thead)) > tbody > tr:not(:first-child) td:first-child {
    width: 22%;
  }
}
