/* 巡检工单和平台标签 */
.tabstrip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
[role="tab"] {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: var(--tap);
  max-width: 100%;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
[role="tab"]:hover { color: var(--text); border-color: var(--text-faint); }
[role="tab"][aria-selected="true"] {
  border-color: var(--accent);
  background: var(--bg-panel-2);
  color: var(--text);
}
[role="tabpanel"] { min-width: 0; }
.inspector {
  display: grid;
  grid-template-columns: minmax(0, 34fr) minmax(0, 66fr);
  align-items: start;
  gap: clamp(14px, 2vw, 28px);
}
.inspector > *, .inspector__deck > * { min-width: 0; }
.inspector__list { display: grid; gap: 8px; }
.inspector__list [role="tab"] {
  position: relative;
  display: block;
  padding: 12px 16px;
  border-color: var(--border);
  text-align: start;
}
.inspector__list [role="tab"][aria-selected="true"] {
  box-shadow: inset 3px 0 var(--accent);
}
.inspector__name { display: block; font: 900 17px/1.2 var(--font-display); }
.inspector__field { display: block; margin-top: 5px; color: var(--text-muted); font: 12px/1.4 var(--font-mono); }
.inspector__controls { margin-top: 9px; }
.inspector__pause {
  padding: 6px 10px;
  min-height: var(--tap);
  border: 0;
  border-radius: var(--r-xs);
  background: var(--clear);
  color: var(--accent);
  font-size: var(--size-note);
  text-decoration: underline;
  text-underline-offset: .2em;
}
.inspector__pause:disabled { color: var(--text-muted); text-decoration: none; }
[data-autoplay].is-running [role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 3px 0;
  height: 2px;
  background: var(--accent);
  color: var(--ink);
  transform-origin: left;
  animation: inspection-pass 9s linear both;
}
[data-autoplay].is-paused [role="tab"][aria-selected="true"]::after { animation-play-state: paused; }
@keyframes inspection-pass { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  [data-autoplay].is-running [role="tab"][aria-selected="true"]::after { animation: none; }
}

.toc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-block: 12px;
  margin-bottom: 24px;
  border-block: 1px solid var(--hairline);
}
.toc-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  max-width: 100%;
  padding: 6px 13px;
  border-radius: var(--r-sm);
  background: var(--bg-panel);
  color: var(--accent);
  font-size: var(--size-note);
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.toc-tabs a:hover { text-decoration: underline; }

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  display: block;
  position: relative;
  min-height: var(--tap);
  padding: 12px 34px 12px 0;
  font-weight: 800;
  list-style: none;
  overflow-wrap: anywhere;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  inset: 12px 6px auto auto;
  color: var(--accent);
  font-family: var(--font-mono);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding-right: 20px; color: var(--text-muted); }
.term-card dt { margin-bottom: 7px; font: 900 var(--size-h3)/1.25 var(--font-display); }
.term-card dd { margin: 0; color: var(--text-muted); }
.client-card__head, .card-meta, .card-actions, .badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.client-card__head { margin-bottom: 12px; }
.client-card__head h3 { margin: 0; }
.client-card__icon { width: 56px; height: 56px; flex-shrink: 0; }
.card-actions { margin-top: 16px; }
.card-meta { margin-bottom: 12px; color: var(--text-muted); font-size: var(--size-note); }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.post-card > p, .client-card > p { color: var(--text-muted); }
[data-version]:empty { display: none; }
.client-card [data-version] { color: var(--text-muted); font: 12px/1.5 var(--font-mono); }
.badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  min-height: 26px;
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-panel-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.badge--first {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--ink);
}
.badge--pick { border-color: var(--accent); color: var(--accent); }
.badge--archived { color: var(--warn); }

.callout {
  padding: 14px 18px;
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--r-xs) var(--r-sm) var(--r-sm) var(--r-xs);
  background: var(--bg-panel);
  color: var(--text);
  overflow-wrap: anywhere;
}
.callout > :last-child { margin-bottom: 0; }
.callout--warn { border-inline-start-color: var(--warn); }

.table-wrap, .prose table, .wrap table {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
.table-wrap { margin-block: 0 1em; }
.prose table, .wrap table { display: block; }
.data-table, .prose table, .wrap table {
  border-collapse: collapse;
  font-size: var(--size-note);
}
.table-wrap > table {
  display: table;
  width: 100%;
  max-width: none;
}
:is(.data-table, .prose table, .wrap table) :is(th, td) {
  min-width: 7em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
:is(.data-table, .prose table, .wrap table) th {
  background: var(--bg-panel-2);
  color: var(--text);
}
:is(.data-table, .prose table, .wrap table) td {
  background: var(--bg-panel);
  color: var(--text-muted);
}
:is(.data-table, .prose table, .wrap table) :is(th, td) code { overflow-wrap: anywhere; }

.article-download { margin-block: 32px; }
.dl-fab {
  position: fixed;
  z-index: 10;
  inset: auto max(var(--gutter), env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  max-width: calc(100% - var(--gutter) * 2);
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 10px 28px -8px var(--shadow-deep);
  font-weight: 850;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.dl-fab svg { width: 17px; height: 17px; flex: none; }
.dl-fab:hover { text-decoration: underline; }
.has-dl-fab { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
.download-dialog {
  width: min(540px, calc(100% - var(--gutter) * 2));
  max-height: 85dvh;
  margin: auto;
}
.download-dialog::backdrop { background: var(--shadow-deep); color: var(--text); }

/* 首页灯塔：窗口全部是装饰，交互入口留在标题区。 */
.hero__atmo { position: absolute; inset: 0; pointer-events: none; }
.star { position: absolute; width: 14px; height: 14px; }
.star path { fill: none; stroke: var(--text-muted); stroke-width: 1.4; stroke-linecap: round; opacity: .55; }
.star--a { top: 14%; left: 9%; }
.star--b { top: 22%; right: 11%; width: 18px; height: 18px; }
.star--c { top: 58%; left: 4%; width: 11px; height: 11px; }
.star--d { top: 6%; right: 31%; width: 10px; height: 10px; }
.star--e { top: 52%; right: 5%; }
.star--f { top: 34%; left: 22%; width: 9px; height: 9px; }
.beacon { position: relative; z-index: 1; width: min(var(--container), 100%); height: 370px; }
.beacon__glow {
  position: absolute;
  left: 50%;
  bottom: -46px;
  width: 600px;
  height: 170px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--glow-warm), var(--clear) 70%);
  color: inherit;
}
.beam { position: absolute; top: 20px; width: 560px; height: 330px; z-index: 1; color: inherit; }
.beam::after { content: ""; position: absolute; inset: 0; color: inherit; }
.beam--l {
  right: 50%;
  transform-origin: 100% 12%;
  clip-path: polygon(100% 12%, 0 0, 0 100%);
  background: linear-gradient(270deg, var(--beam-hi), var(--beam-lo) 92%);
}
.beam--l::after {
  clip-path: polygon(100% 12%, 0 26%, 0 66%);
  background: linear-gradient(270deg, var(--beam-core), var(--beam-lo) 80%);
}
.beam--r {
  left: 50%;
  transform-origin: 0 12%;
  clip-path: polygon(0 12%, 100% 0, 100% 100%);
  background: linear-gradient(90deg, var(--beam-hi), var(--beam-lo) 92%);
}
.beam--r::after {
  clip-path: polygon(0 12%, 100% 26%, 100% 66%);
  background: linear-gradient(90deg, var(--beam-core), var(--beam-lo) 80%);
}
@media (prefers-reduced-motion: no-preference) {
  .beacon--sweep .beam--l { animation: sweep-l 11s ease-in-out infinite alternate; }
  .beacon--sweep .beam--r { animation: sweep-r 11s ease-in-out infinite alternate; }
}
@keyframes sweep-l { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes sweep-r { from { transform: rotate(4deg); } to { transform: rotate(-4deg); } }
.lighthouse {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 4;
  width: 222px;
  height: 370px;
  transform: translateX(-50%);
  overflow: visible;
}
.stop-accent { stop-color: var(--accent); }
.stop-accent-dark { stop-color: var(--accent-dark); }
.lh-stroke { stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.lh-outline { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.lh-light { fill: var(--accent-3); }
.lh-dark { fill: var(--accent-3-deep); }
.lh-stripe { fill: var(--ink); fill-opacity: .32; }
.lh-ink { fill: var(--ink); }
.lh-gold { fill: var(--accent); }
.lh-core { fill: var(--text); }
.lh-window { fill: var(--accent); fill-opacity: .55; }
.lh-rock { fill: var(--bg-panel-2); }
.lh-rock-shade { fill: var(--ink); fill-opacity: .28; }
.lh-ear-in { fill: var(--ink); fill-opacity: .32; }
.lh-head-shade { fill: var(--ink); fill-opacity: .18; }
.lh-line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.lh-tick { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-opacity: .6; }
.lh-shine { fill: none; stroke: var(--text); stroke-opacity: .4; stroke-width: 3; stroke-linecap: round; }
.beacon .panel { position: absolute; z-index: 2; }
.beacon .panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  color: inherit;
}
.panel--l { box-shadow: 14px 0 34px -18px var(--edge-lit), var(--shadow-card); }
.panel--l::after { background: linear-gradient(270deg, var(--edge-wash), var(--clear) 45%); color: inherit; }
.panel--r {
  background: var(--panel-face) padding-box, linear-gradient(270deg, var(--accent-2), var(--accent)) border-box;
  color: var(--text);
  box-shadow: -14px 0 34px -18px var(--edge-lit), var(--shadow-card);
}
.panel--r::after { background: linear-gradient(90deg, var(--edge-wash), var(--clear) 45%); color: inherit; }
.beacon .panel--config { left: 24px; top: 12px; width: 316px; transform: rotate(-2deg); }
.beacon .panel--rules { left: 150px; top: 176px; width: 332px; z-index: 3; transform: rotate(1.2deg); }
.beacon .panel--log { right: 24px; top: 8px; width: 340px; transform: rotate(1.8deg); }
.beacon .panel--term { right: 142px; top: 178px; width: 344px; z-index: 3; transform: rotate(-1.4deg); }
.beacon .panel__bar { height: 32px; padding-block: 0; flex-wrap: nowrap; }
.beacon .panel__tab { height: 100%; }
.beacon .panel__body { overflow: visible; }
.row { display: block; white-space: pre; }
.code--num { counter-reset: ln; }
.code--num .row::before {
  counter-increment: ln;
  content: counter(ln);
  display: inline-block;
  width: 14px;
  margin-right: 12px;
  text-align: right;
  color: var(--text-muted);
}
.log { font-size: 11.5px; line-height: 1.65; }
.log .row { white-space: pre-wrap; margin-bottom: 3px; }
.term { font-size: 11.5px; }
.cursor {
  display: inline-block;
  width: .62em;
  height: 1.15em;
  vertical-align: -.22em;
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 0 10px var(--edge-lit);
}
@media (max-width: 1240px) {
  .beacon .panel--rules { left: 24px; }
  .beacon .panel--term { right: 24px; }
}
@media (max-width: 880px) {
  .beacon .panel { display: none; }
  .beacon { height: 320px; }
  .lighthouse { width: 192px; height: 320px; }
  .beam { top: 16px; width: 420px; height: 280px; }
}
@media (max-width: 640px) {
  .inspector { grid-template-columns: minmax(0, 1fr); }
  .beacon .panel { transform: none; }
}

/* 预览页的样本陈列 */
.preview-label { color: var(--text-muted); font: 600 12px/1.4 var(--font-mono); }
.swatches { grid-template-columns: repeat(auto-fit, minmax(min(100%, 142px), 1fr)); list-style: none; padding: 0; }
.swatches li { overflow-wrap: anywhere; font: 12px/1.5 var(--font-mono); }
.swatch {
  display: block;
  height: 38px;
  margin-bottom: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  background: var(--sample, var(--clear));
  color: var(--text);
}
.s-bg { --sample: var(--bg); }
.s-bg-deep { --sample: var(--bg-deep); }
.s-bg-panel { --sample: var(--bg-panel); }
.s-bg-panel-2 { --sample: var(--bg-panel-2); }
.s-border { --sample: var(--border); }
.s-accent { --sample: var(--accent); }
.s-accent-dark { --sample: var(--accent-dark); }
.s-accent-2 { --sample: var(--accent-2); }
.s-accent-3 { --sample: var(--accent-3); }
.s-accent-3-deep { --sample: var(--accent-3-deep); }
.s-text { --sample: var(--text); }
.s-text-muted { --sample: var(--text-muted); }
.s-text-faint { --sample: var(--text-faint); }
.s-success { --sample: var(--success); }
.s-warn { --sample: var(--warn); }
.s-error { --sample: var(--error); }
.s-ink { --sample: var(--ink); }
.s-clear { --sample: var(--clear); }
.s-beam-hi { --sample: var(--beam-hi); }
.s-beam-core { --sample: var(--beam-core); }
.s-beam-lo { --sample: var(--beam-lo); }
.s-glow-warm { --sample: var(--glow-warm); }
.s-edge-lit { --sample: var(--edge-lit); }
.s-edge-wash { --sample: var(--edge-wash); }
.s-shadow-deep { --sample: var(--shadow-deep); }
.s-shadow-soft { --sample: var(--shadow-soft); }
.s-bar-bg { --sample: var(--bar-bg); }
.s-chip-bg { --sample: var(--chip-bg); }
.s-hairline { --sample: var(--hairline); }
.s-rim { --sample: var(--rim); }
.preview-display { font: var(--weight-display) var(--size-h1)/1.16 var(--font-display); letter-spacing: -.015em; }
.preview-buttons { margin-block: 20px; gap: 14px; }
.preview-buttons figure { margin: 0; }
.preview-buttons figcaption { margin-top: 6px; }