/* 风格 14 · 字样 Type Specimen
   纸白 + 墨黑，没有第三种颜色。细横线分行；正文用中性系统字体，每一行样张用自己的字体气质。
   大字号靠 clamp 撑开；字号瀑布 36/24/16/12；样字带度量线。 */
html[data-style="specimen"] {
  --paper: #faf9f6;
  --ink: #111111;
  --ink-2: #555555;
  --rule: #d9d7d2;
  --rule-strong: #111111;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono Variable", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: light;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.55;
}
html[data-style="specimen"] body { background: var(--paper); }
html[data-style="specimen"] ::selection { background: var(--ink); color: var(--paper); }

.sp-sheet { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 120px; }

/* ---- 刊头 ---- */
.sp-mast { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; padding: 28px 0 22px; border-bottom: 2px solid var(--rule-strong); align-items: end; }
.sp-eyebrow { margin: 0 0 10px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; color: var(--ink-2); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sp-title { margin: 0; font-size: clamp(3rem, 2rem + 6vw, 7.5rem); line-height: .92; letter-spacing: -.045em; font-weight: 700; font-family: "Inter Variable", "Helvetica Neue", "Arial Nova", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
.sp-cn { margin: 8px 0 0; font-size: clamp(1.2rem, 1rem + 1.2vw, 1.8rem); letter-spacing: .3em; font-family: "Source Han Serif CN VF", "Songti SC", STSong, "Noto Serif CJK SC", SimSun, serif; }
.sp-toc { font-size: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px 14px; align-self: end; }
.sp-toc p { grid-column: 1 / -1; margin: 0 0 6px; color: var(--ink-2); font-family: var(--mono); font-size: 11px; }
.sp-toc a { display: grid; grid-template-columns: 22px 1fr; column-gap: 6px; color: var(--ink); text-decoration: none; padding: 2px 0; border-bottom: 1px solid var(--rule); line-height: 1.3; }
.sp-toc a b { font-family: var(--mono); font-weight: 400; color: var(--ink-2); grid-row: span 2; }
.sp-toc a i { font-style: normal; color: var(--ink-2); font-size: 10.5px; grid-column: 2; }
.sp-toc a:hover { border-bottom-color: var(--ink); }
.sp-toc a[aria-current="page"] { border-bottom: 2px solid var(--ink); font-weight: 700; }

/* ---- 样字 ---- */
.sp-hero { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 40px; padding: 28px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.sp-glyph { position: relative; margin: 0; height: 300px; border: 1px solid var(--rule); background: #fff; overflow: hidden; }
.sp-g { position: absolute; bottom: 62px; line-height: 1; font-size: 150px; letter-spacing: -.04em; transition: font-size .2s; }
.sp-g-latin { left: 88px; }
.sp-g-han { right: 22px; font-size: 140px; }
.sp-line { position: absolute; left: 0; right: 0; border-top: 1px dashed rgb(17 17 17 / .45); pointer-events: none; }
.sp-line i { position: absolute; left: 8px; top: -14px; font-family: var(--mono); font-size: 9.5px; font-style: normal; color: var(--ink-2); letter-spacing: .04em; background: #fff; padding: 0 3px; }
.sp-line-base { bottom: 62px; border-top-style: solid; }
.sp-line-x { bottom: calc(62px + 78px); }
.sp-line-cap { bottom: calc(62px + 108px); }
.sp-glyph figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px; border-top: 1px solid var(--rule); background: var(--paper); font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); display: flex; gap: 8px; }
.sp-glyph figcaption b { color: var(--ink); font-weight: 700; }
.sp-glyph figcaption span { margin-left: auto; }
.sp-hero-t { padding-top: 4px; }
.sp-lede { margin: 0 0 18px; font-size: 16px; line-height: 1.65; max-width: 62ch; font-family: "EB Garamond Variable", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Source Han Serif CN VF", "Songti SC", STSong, "Noto Serif CJK SC", SimSun, serif; }
.sp-meta { border-collapse: collapse; width: 100%; max-width: 560px; margin-bottom: 14px; font-size: 13px; }
.sp-meta th, .sp-meta td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--rule); }
.sp-meta th { font-weight: 400; color: var(--ink-2); font-family: var(--mono); font-size: 11.5px; width: 22%; }
.sp-meta td { font-weight: 700; font-variant-numeric: tabular-nums; width: 28%; }
.sp-note { margin: 0; color: var(--ink-2); font-size: 12.5px; max-width: 66ch; }
.sp-note code { font-family: var(--mono); font-size: 12px; }

/* ---- 工具条 ---- */
.sp-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); position: sticky; top: 0; background: var(--paper); z-index: 20; }
.sp-q { flex: 1 1 300px; min-width: 0; display: flex; align-items: center; gap: 10px; border-bottom: 2px solid var(--ink); padding: 4px 0; }
.sp-q span { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.sp-q input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; font-size: 16px; color: var(--ink); font-family: inherit; }
.sp-q input::placeholder { color: #6f6d66; }
.sp-tools select, #sp-reset { border: 1px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 0; padding: 6px 10px; font-size: 12.5px; font-family: var(--mono); }
#sp-reset:hover { background: var(--ink); color: var(--paper); }

/* ---- 域样张行 ---- */
.sp-rows { display: flex; flex-direction: column; }
.sp-row {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) 260px; gap: 24px; align-items: center;
  width: 100%; text-align: left; padding: 22px 0; border-bottom: 1px solid var(--rule); background: none; border-left: 0; border-right: 0; border-top: 0;
  color: var(--ink); font: inherit; cursor: pointer;
}
.sp-row:hover { background: #fff; }
.sp-row:hover .sp-big { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.sp-row-l { display: flex; flex-direction: column; gap: 1px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); line-height: 1.4; }
.sp-row-l b { color: var(--ink); font-weight: 700; font-size: 13px; }
.sp-row-l span { color: var(--ink); font-family: var(--body); font-size: 13px; }
.sp-row-l i { font-style: normal; }
.sp-row-l em { font-style: normal; margin-top: 6px; }
.sp-row-m { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sp-big { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem); line-height: 1.05; letter-spacing: -.01em; }
.sp-small { font-size: 15px; line-height: 1.5; color: var(--ink); max-width: 46ch; }
.sp-row-r { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; color: var(--ink); border-left: 1px solid var(--rule); padding-left: 20px; }
.sp-row-r span { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-row-r span::after { content: attr(class); position: absolute; right: 0; bottom: 2px; font-family: var(--mono); font-size: 9.5px; color: var(--ink-2); letter-spacing: .04em; font-weight: 400; }
.sp-row-r .s36 { font-size: 36px; } .sp-row-r .s24 { font-size: 24px; } .sp-row-r .s16 { font-size: 16px; } .sp-row-r .s12 { font-size: 12px; }

/* ---- 域内 ---- */
.sp-dh { padding: 26px 0 18px; border-bottom: 2px solid var(--rule-strong); }
.sp-dh-l { margin: 0 0 8px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.sp-dh-l b { color: var(--ink); }
.sp-dh-l i { font-style: normal; }
.sp-back, .sp-linkbtn { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.sp-back { font-family: var(--mono); font-size: 12px; margin-right: 6px; }
.sp-linkbtn { font: inherit; text-decoration: none; }
.sp-linkbtn:hover { text-decoration: underline; }
.sp-dh h2 { margin: 0; font-size: clamp(3rem, 2rem + 5vw, 6.5rem); line-height: .98; letter-spacing: -.02em; }
.sp-dh-b { margin: 12px 0 8px; font-size: 20px; max-width: 60ch; }
.sp-stack { margin: 0; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); word-break: break-all; }
.sp-stack span { color: var(--ink); }
.sp-sec { padding: 8px 0 14px; }
.sp-sh { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: baseline; padding: 18px 0 10px; border-bottom: 1px solid var(--rule); }
.sp-sh span { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.sp-sh h3 { margin: 0; font-size: 26px; line-height: 1.1; }
.sp-sh em { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.sp-sh p { grid-column: 2; margin: 0; font-size: 12.5px; color: var(--ink-2); }
.sp-items { list-style: none; margin: 0; padding: 0; }
.sp-item a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 96px; grid-template-rows: auto auto auto; column-gap: 18px; row-gap: 2px;
  padding: 12px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink);
}
.sp-item a:hover { background: #fff; }
.sp-item-n { font-size: 22px; line-height: 1.15; grid-column: 1; }
.sp-item a:hover .sp-item-n { text-decoration: underline; text-underline-offset: 5px; }
.sp-item-tags { grid-column: 2; grid-row: 1; display: flex; gap: 4px; align-items: center; }
.sp-tier { font-style: normal; font-family: var(--mono); font-size: 11px; width: 20px; height: 20px; display: inline-grid; place-items: center; border: 1px solid var(--ink); }
.sp-tier-S { background: var(--ink); color: var(--paper); font-weight: 700; }
.sp-tier-B { border-color: var(--rule); color: var(--ink-2); }
.sp-lang { font-style: normal; font-size: 11px; padding: 0 5px; border: 1px solid var(--rule); height: 20px; display: inline-grid; place-items: center; }
.sp-item-d { grid-column: 1 / 3; font-size: 13.5px; color: var(--ink); max-width: 76ch; }
.sp-item-m { grid-column: 1 / 3; font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.sp-shot { grid-column: 3; grid-row: 1 / 4; width: 96px; aspect-ratio: 8/5; object-fit: cover; border: 1px solid var(--rule); filter: grayscale(1) contrast(1.05); align-self: start; }
.sp-item a:hover .sp-shot { filter: none; }
.sp-empty { padding: 60px 0; text-align: center; color: var(--ink-2); border-bottom: 1px solid var(--rule); }
.sp-empty p { margin: 0 0 12px; }

/* ---- 套件 / 用法 / 方法 / 方案卡 ---- */
.sp-block { padding: 28px 0 10px; border-bottom: 1px solid var(--rule); }
.sp-bh { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.sp-bh span { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.sp-bh h2 { margin: 0; font-size: 30px; line-height: 1.1; }
.sp-bh em { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); margin-left: auto; }
.sp-skills { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.sp-skills li { display: grid; grid-template-columns: 28px 1fr; gap: 2px 10px; padding: 9px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.sp-skn { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.sp-skills a { text-decoration: none; color: var(--ink); }
.sp-skills code { font-family: var(--mono); font-size: 14px; font-weight: 600; }
.sp-skills a:hover code { text-decoration: underline; }
.sp-skills p { grid-column: 2; margin: 0; font-size: 12.5px; color: var(--ink-2); }
.sp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.sp-code { margin: 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.75; border-left: 2px solid var(--ink); padding: 4px 0 4px 16px; overflow-x: auto; }
.sp-prompts { margin: 0; padding: 0 0 0 1.2em; font-size: 17px; line-height: 1.7; }
.sp-method { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; font-size: 15px; }
.sp-method dt { font-weight: 700; font-size: 17px; }
.sp-method dd { margin: 4px 0 0; color: var(--ink); line-height: 1.6; }
.sp-board p { margin: 0 0 12px; font-size: 14.5px; max-width: 76ch; }
.sp-axes { margin: 0 0 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; }
.sp-axes div { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.sp-axes dt { color: var(--ink-2); font-family: var(--mono); font-size: 11.5px; flex: 0 0 3.5em; padding-top: 2px; }
.sp-axes dd { margin: 0; }
.sp-risk { color: var(--ink-2) !important; font-size: 13px !important; }
.sp-risk b { display: block; color: var(--ink); font-family: var(--mono); font-size: 11.5px; margin-bottom: 2px; }
.sp-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.sp-foot a { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { .sp-g { transition: none; } }

/* ---- 响应式 ---- */
@media (max-width: 1000px) {
  .sp-mast { grid-template-columns: 1fr; }
  .sp-toc { grid-template-columns: repeat(3, 1fr); }
  .sp-hero { grid-template-columns: 1fr; }
  .sp-glyph { max-width: 520px; }
  .sp-row { grid-template-columns: 130px minmax(0, 1fr); }
  .sp-row-r { display: none; }
  .sp-skills, .sp-two, .sp-method { grid-template-columns: 1fr; }
  .sp-axes { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .sp-toc { grid-template-columns: 1fr 1fr; }
  .sp-glyph { height: 220px; }
  .sp-g { font-size: 110px; bottom: 52px; }
  .sp-g-latin { left: 70px; }
  .sp-g-han { font-size: 102px; }
  .sp-line-base { bottom: 52px; } .sp-line-x { bottom: calc(52px + 57px); } .sp-line-cap { bottom: calc(52px + 79px); }
  .sp-row { grid-template-columns: 1fr; gap: 8px; padding: 18px 0; }
  .sp-row-l { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .sp-row-l em { margin: 0; }
  .sp-item a { grid-template-columns: minmax(0, 1fr) auto; }
  .sp-shot { display: none; }
  .sp-item-n { font-size: 19px; }
  .sp-axes { grid-template-columns: 1fr; }
  .sp-tools { position: static; }
}
