/* 保留旧表格、文档目录和工具的布局，颜色与字体跟随公共站点样式。 */
body::before, body::after { display: none; }
.pig-subpage {
  --serif: var(--sans);
  --accent-mono: var(--mono);
  --panel: var(--surface);
  --panel-base: var(--surface);
  --panel-soft: var(--bg);
  --panel-soft-base: var(--surface);
  --recording-bg-color: var(--bg);
  --copy: var(--muted);
  --muted-strong: var(--muted);
  --line-strong: var(--line);
  --accent: var(--site-accent);
  --focus-ring: var(--site-accent);
  --accent-border-muted: var(--line);
  --accent-border-active: var(--site-accent);
  --accent-surface-subtle: color-mix(in srgb, var(--site-accent) 6%, transparent);
  --accent-surface-soft: color-mix(in srgb, var(--site-accent) 10%, transparent);
  --active-stripe: var(--site-accent);
  --active-stripe-vertical: var(--site-accent);
  --control-background: var(--bg);
  --control-background-hover: var(--accent-surface-soft);
  --panel-deep-overlay: transparent;
  --rich-text-pre-background: var(--bg);
  --rich-text-pre-border: var(--line);
  --rich-text-pre-color: var(--text);
  --rich-text-code-background: var(--bg);
  --rich-text-code-color: var(--text);
  --table-heading-background: var(--bg);
  --content-shell-padding: clamp(1.25rem, 3vw, 2.5rem) 0 3.5rem;
  width: min(100% - 3rem, 76rem);
}
.pig-subpage .surface-panel { border-radius: .65rem; }
.pig-subpage .content-hero { padding: 0 0 .75rem; }
.pig-subpage .packages-hero { display: grid; gap: 1.25rem; max-width: none; align-items: end; }
.packages-hero .content-description { font: 1rem/1.65 var(--sans); max-width: 52ch; }
.packages-publish-link { display: inline-block; margin-top: .55rem; color: var(--site-accent); font-size: .9rem; font-weight: 650; }
.packages-publish-link:hover { text-decoration: underline; text-underline-offset: .18em; }
.packages-quick-install { min-width: 0; }
.packages-quick-install h2 { margin: 0 0 .45rem; color: var(--muted); font: 650 .875rem/1.4 var(--sans); }
@media (min-width: 52rem) {
  .pig-subpage .packages-hero { grid-template-columns: minmax(0, 1fr) minmax(0, max-content); }
}
.pig-subpage :is(.content-title, .docs-page-title, .docs-prose h2, .news-feed-card h2, .news-article-title, .news-prose h3) {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 720;
  line-height: 1.2;
}
.pig-subpage .content-title { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.025em; margin-bottom: .5rem; }
.pig-subpage .docs-page-title { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.pig-subpage .docs-prose { --copy: var(--text); line-height: 1.7; }
.pig-subpage .docs-prose h2 { font-size: clamp(1.25rem, 2.1vw, 1.7rem); }
.pig-subpage .docs-prose hr { border: 0; border-block-start: 1px solid var(--line); margin-block: 1.5rem; }
.docs-prose .agent-flow {
  container-type: inline-size;
  margin: 1rem 0;
  padding: clamp(.75rem, 2vw, 1.1rem);
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--bg);
  font-size: .9rem;
  line-height: 1.45;
}
.agent-flow figcaption { margin-bottom: .8rem; font-weight: 700; }
.docs-prose .agent-flow :is(ol, ul) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .95rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.docs-prose .agent-flow li {
  position: relative;
  display: grid;
  align-content: start;
  gap: .25rem;
  margin: 0;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--surface);
}
.agent-flow li > span { color: var(--muted); }
.agent-flow .agent-flow-step { color: var(--site-accent); font: 650 .75rem/1.4 var(--mono); }
.agent-flow-steps li + li::before {
  position: absolute;
  inset: -.75rem auto auto calc(50% - .2rem);
  width: .4rem;
  height: .4rem;
  content: '';
  border-right: 1px solid var(--site-accent);
  border-bottom: 1px solid var(--site-accent);
  transform: rotate(45deg);
}
.docs-prose .agent-flow .agent-flow-branches { position: relative; gap: .55rem; margin-top: 1rem; }
.agent-flow-branches::before { position: absolute; inset: -1rem auto auto 50%; height: 1rem; border-left: 1px solid var(--line); content: ''; }
.agent-flow .agent-flow-loop { color: var(--site-accent); font-weight: 650; }
.docs-prose .agent-flow .agent-flow-note { margin: .75rem 0 0; color: var(--muted); font-size: .8rem; }
@container (min-width: 24rem) {
  .docs-prose .agent-flow .agent-flow-branches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-flow-branches::before { inset: -.6rem 25% auto; height: .6rem; border: 1px solid var(--line); border-bottom: 0; }
  .agent-flow-branches::after { position: absolute; inset: -1rem auto auto 50%; height: .4rem; border-left: 1px solid var(--line); content: ''; }
}
@container (min-width: 31rem) {
  .docs-prose .agent-flow .agent-flow-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .agent-flow-steps li + li::before { inset: calc(50% - .2rem) auto auto -.77rem; transform: rotate(-45deg); }
  .agent-flow-branches::after { inset: -1rem calc((100% - 1.9rem) / 6) auto 75%; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
}
@media (min-width: 1200px) {
  .pig-subpage .docs-layout { grid-template-areas: "nav main"; grid-template-rows: 1fr; }
  .pig-subpage .docs-layout:not(.docs-layout-no-toc) { grid-template-areas: "nav main toc"; }
}
.pig-subpage .news-feed, .pig-subpage .news-feed-card-body { grid-template-columns: minmax(0, 1fr); }
.pig-subpage .news-release-summary :not(pre) > code {
  white-space: normal;
  overflow-wrap: anywhere;
}
.pig-subpage .docs-nav-link.is-active { color: var(--site-accent); background: var(--accent-surface-soft); }
.pig-subpage.docs-page { --docs-sticky-top: .75rem; }
.models-directory .content-description { color: var(--muted); }
.model-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .6fr) auto;
  align-items: end;
  gap: .75rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--surface);
}
.model-filters label { min-width: 0; }
.model-filters label span { display: block; margin-bottom: .25rem; color: var(--muted); font-size: .85rem; }
.model-filters :is(input, select) { width: 100%; min-height: 2.5rem; }
.model-filters select { appearance: auto; padding-inline: .6rem; }
.model-filter-actions, .model-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.model-filter-actions :is(button, a), .model-pagination a { min-height: 2.5rem; }
.model-results-count, .model-price-note, .model-empty { margin-block: .8rem; color: var(--muted); font-size: .875rem; }
.model-empty { padding: 1rem 0; }
.model-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .9rem; }
.model-table th { background: var(--surface); color: var(--muted); font-weight: 650; }
.model-table th:first-child { width: 39%; }
.model-table th:nth-child(2) { width: 22%; }
.model-table :is(th, td) { border-bottom: 1px solid var(--line); padding: .6rem .75rem; text-align: start; vertical-align: top; overflow-wrap: anywhere; }
.model-table :is(th, td):nth-child(n + 3) { text-align: end; font-variant-numeric: tabular-nums; }
.model-detail { font-size: .84rem; }
.model-detail summary { width: fit-content; margin-top: .14rem; color: var(--site-accent); cursor: pointer; }
.model-detail[open] summary { margin-bottom: .5rem; }
.model-id-label { display: block; margin-bottom: .22rem; color: var(--muted); }
.model-cache { display: flex; flex-wrap: wrap; gap: .25rem 1.15rem; margin: .5rem 0 0; }
.model-cache div { display: flex; gap: .45rem; }
.model-cache dt { color: var(--muted); }
.model-cache dd { margin: 0; }
.model-pagination { justify-content: center; margin-top: 1rem; font-size: .9rem; }
@media (max-width: 42rem) {
  .model-filters { grid-template-columns: minmax(0, 1fr); }
  .model-table, .model-table tbody { display: block; }
  .model-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .model-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: .5rem; border: 1px solid var(--line); border-radius: .6rem; background: var(--surface); }
  .model-table tbody td { min-width: 0; border: 0; padding: .35rem .65rem; }
  .model-table tbody td:nth-child(n + 3) { text-align: start; }
  .model-table td[data-label]::before { display: block; content: attr(data-label); color: var(--muted); font-size: .75rem; }
  .model-table td.model-name { grid-column: 1 / -1; border-bottom: 1px solid var(--line); padding-block: .55rem; }
}
.pig-subpage .content-card-title { font: 650 .9rem/1.25 var(--sans); letter-spacing: 0; text-transform: none; }
.pig-subpage .text-control, .pig-subpage .select-control, .pig-subpage .action-button, .pig-subpage .link-button { border-radius: .45rem; }
@media (max-width: 48rem) {
  .pig-subpage { width: calc(100% - 2rem); }
}
