.tab-shell {
  min-width: 0;
}

.tab-list {
  display: flex;
  max-width: 100%;
  gap: 8px;
  padding: 7px;
  overflow-x: auto;
  border-radius: var(--radius-control);
  background: var(--bg-panel);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.tab-list [role="tab"] {
  position: relative;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 9px 17px;
  border-radius: var(--radius-small);
  background: var(--black-clear);
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.tab-list [role="tab"]:hover {
  color: var(--accent-dark);
}

.tab-list [role="tab"][aria-selected="true"],
.tab-list [role="tab"].is-active {
  background: var(--bg);
  color: var(--accent-dark);
  box-shadow: var(--shadow-card);
}

.tab-panel {
  min-width: 0;
  padding-top: 28px;
}

.tab-panel[hidden] {
  display: none;
}

.feature-workbench {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.8fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.feature-rail {
  display: grid;
  gap: 8px;
}

.feature-rail [role="tab"] {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 68px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  align-items: center;
  border-radius: var(--radius-control);
  background: var(--black-clear);
  color: var(--text-muted);
  text-align: left;
}

.feature-rail [role="tab"]::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 4px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  content: "";
  opacity: 0;
}

.feature-rail [role="tab"][aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.feature-rail [role="tab"][aria-selected="true"]::before {
  opacity: 1;
}

.feature-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  place-items: center;
  border-radius: var(--radius-small);
  background: var(--bg);
  color: var(--accent);
}

.feature-icon svg {
  width: 18px;
  height: 18px;
}

.workbench-backdrop {
  min-width: 0;
  padding: 10px;
  border-radius: calc(var(--radius-panel) + 8px);
  background: linear-gradient(145deg, var(--accent-soft), var(--bg));
}

.workbench-panel {
  min-width: 0;
  padding: clamp(22px, 4vw, 38px);
  border-radius: var(--radius-panel);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-card);
}

.mock-window {
  overflow: clip;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--bg);
  color: var(--text);
}

.mock-window-bar {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.window-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
}

.window-dot-error {
  background: var(--error);
}

.window-dot-warn {
  background: var(--warn);
}

.window-dot-success {
  background: var(--success);
}

.mock-setting-list {
  margin: 0;
  padding: 16px 18px;
  list-style: none;
}

.mock-setting-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.mock-setting-row:last-child {
  border-bottom: 0;
}

.mock-value {
  color: var(--accent-dark);
  font-weight: 700;
}

.mock-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
}

.mock-switch::after {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  background: var(--white);
  content: "";
}

.toc {
  position: sticky;
  z-index: 20;
  top: 12px;
  display: flex;
  max-width: 100%;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-card);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.toc a {
  display: inline-flex;
  min-height: 40px;
  flex: 0 0 auto;
  align-items: center;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.toc a:hover,
.toc a.is-current {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.faq-list {
  display: grid;
  gap: 14px;
}

.faq-item {
  overflow: clip;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--text);
}

.faq-item summary {
  position: relative;
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 750;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  content: "";
  transform: rotate(45deg);
  transition: transform var(--transition-fast);
}

.faq-item[open] summary::after {
  transform: rotate(225deg);
}

.faq-answer {
  padding: 0 22px 20px;
  color: var(--text-muted);
}

.faq-answer > :last-child {
  margin-bottom: 0;
}

.term-card {
  position: relative;
  min-width: 0;
  padding: 26px;
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  color: var(--text);
}

.term-card::before {
  position: absolute;
  top: 26px;
  left: 0;
  width: 4px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  content: "";
}

.term-name {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 20px;
}

.term-alias {
  margin-left: 8px;
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 12px;
}

.term-card p:last-child {
  margin-bottom: 0;
}

.download-card {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  padding: clamp(22px, 4vw, 32px);
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-card);
}

.download-card-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.download-card-main {
  min-width: 0;
}

.download-card-head {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.download-filename {
  display: block;
  max-width: 100%;
  margin-top: 8px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  min-height: 26px;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.badge-featured {
  background: var(--accent);
  color: var(--white);
}

.badge-recommended {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.badge-retired {
  background: var(--bg-panel-2);
  color: var(--text-muted);
}

.badge-success {
  background: var(--success);
  color: var(--white);
}

.badge-warning {
  background: var(--warn);
  color: var(--text);
}

.blog-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  padding: 28px;
  flex-direction: column;
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.blog-card h3 {
  margin-bottom: 14px;
  font-size: clamp(21px, 2.2vw, 27px);
}

.blog-card p {
  color: var(--text-muted);
}

.blog-card-link {
  display: inline-flex;
  margin-top: auto;
  align-items: center;
  gap: 7px;
  color: var(--accent-dark);
  font-weight: 750;
  text-decoration: none;
}

.callout {
  position: relative;
  margin: 28px 0;
  padding: 22px 24px 22px 28px;
  border-radius: var(--radius-control);
  background: var(--accent-soft);
  color: var(--text);
}

.callout::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 5px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  content: "";
}

.callout-title {
  margin-bottom: 7px;
  color: var(--accent-dark);
  font-weight: 800;
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout-success {
  background: var(--bg-panel);
  color: var(--text);
}

.callout-success::before {
  background: var(--success);
}

.callout-warning {
  background: var(--bg-panel-2);
  color: var(--text);
}

.callout-warning::before {
  background: var(--warn);
}

.data-table-wrap,
.prose > .data-table {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  min-width: 680px;
}

.dl-fab {
  position: fixed;
  z-index: 70;
  right: 28px;
  bottom: 28px;
  display: inline-flex;
  min-height: 48px;
  max-width: calc(100vw - 32px);
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--white);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  box-shadow: var(--shadow-fab);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.dl-fab:hover {
  transform: translateY(-2px);
  background: var(--accent-dark);
  color: var(--white);
}

.dl-fab svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.article-download-guide {
  display: grid;
  min-width: 0;
  margin-top: 52px;
  padding: clamp(24px, 4vw, 38px);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  border-radius: var(--radius-card);
  background: var(--accent-soft);
  color: var(--text);
}

.article-download-guide h2,
.article-download-guide h3 {
  margin-bottom: 8px;
  color: var(--text);
}

.article-download-guide p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.preview-hero {
  position: relative;
  min-height: 832px;
  overflow: hidden;
  overflow-x: clip;
  background: linear-gradient(180deg, var(--hero-deep) 0%, var(--hero-mid) 50%, var(--hero-pale) 80%, var(--bg) 100%);
  color: var(--white);
}

.preview-hero .site-header {
  position: absolute;
  inset: 0 0 auto;
  background: var(--black-clear);
}

.hero-sky {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.floating-config {
  position: absolute;
  width: 226px;
  animation: config-drift 23s ease-in-out infinite alternate;
}

.floating-config-near {
  opacity: 0.93;
}

.floating-config-far {
  opacity: 0.58;
  filter: blur(1.4px);
}

.floating-config-inner {
  overflow: hidden;
  border: 1px solid var(--panel-ring);
  border-radius: 18px;
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-hero-card);
}

.float-one {
  top: 125px;
  left: 3%;
}

.float-two {
  top: 392px;
  left: 2%;
  animation-delay: -7s;
}

.float-three {
  top: 142px;
  right: 3%;
  animation-delay: -11s;
}

.float-four {
  top: 422px;
  right: 3%;
  animation-delay: -4s;
}

.float-five {
  top: 648px;
  left: 5%;
  animation-delay: -14s;
}

.float-six {
  top: 650px;
  right: 5%;
  animation-delay: -9s;
}

.float-pad {
  padding: 14px;
}

.float-app-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--border);
}

.float-app-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  place-items: center;
  border-radius: var(--radius-small);
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  color: var(--white);
  font-family: var(--font-mono);
  font-weight: 800;
}

.float-app-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.float-app-subtitle {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.4;
}

.float-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  color: var(--text);
  font-size: 11px;
}

.float-code {
  margin: 0;
  padding: 12px 14px;
  border-radius: 0;
  background: var(--bg);
  color: var(--code-punctuation);
  font-size: 10px;
  line-height: 1.7;
}

.float-code .key {
  color: var(--code-key);
}

.float-code .string {
  color: var(--code-string);
}

.float-tag {
  display: inline-flex;
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 700;
}

.hero-core {
  position: relative;
  z-index: 10;
  display: flex;
  max-width: 860px;
  margin-inline: auto;
  padding: 126px var(--gutter) 0;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.hero-topline {
  margin-bottom: 0;
  color: var(--hero-ink-dim);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.09em;
}

.hero-topline strong {
  color: var(--hero-ink);
}

.preview-hero .hero-title {
  margin: 26px 0 0;
  background: linear-gradient(180deg, var(--white) 34%, var(--hero-title-soft) 100%);
  color: var(--white);
  font-weight: 900;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: var(--black-clear);
}

.hero-lede {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--hero-ink);
  font-size: 16px;
  line-height: 1.9;
}

.hero-lede strong {
  color: var(--white);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 34px;
}

.import-panel {
  width: min(720px, 100%);
  margin-top: 42px;
  padding: 14px 14px 12px;
  border-radius: var(--radius-panel);
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--panel-ring), 0 0 0 8px var(--panel-ring-soft), var(--shadow-hero-panel);
}

.import-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.import-field {
  display: flex;
  min-width: 0;
  min-height: 56px;
  flex: 1;
  align-items: center;
  padding: 0 20px;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-control);
  background: var(--field-bg);
  color: var(--text-muted);
  text-align: left;
}

.import-field code {
  padding: 0;
  background: var(--black-clear);
  color: var(--text-muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.import-button {
  display: inline-flex;
  min-height: 56px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 26px;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--white);
  font-weight: 750;
}

.import-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding: 0 8px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: left;
}

.import-status {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--success);
}

.platform-row {
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.platform-row a,
.platform-row li {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid var(--hero-border);
  border-radius: var(--radius-pill);
  background: var(--hero-pill);
  color: var(--white);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.platform-row a:hover {
  background: var(--hero-pill-hover);
  color: var(--white);
}

.platform-row svg {
  width: 15px;
  height: 15px;
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.swatch {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--bg);
  color: var(--text);
}

.swatch-color {
  height: 86px;
}

.swatch-body {
  padding: 12px;
}

.swatch-name {
  display: block;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.swatch-bg {
  background: var(--bg);
}

.swatch-panel {
  background: var(--bg-panel);
}

.swatch-panel-2 {
  background: var(--bg-panel-2);
}

.swatch-border {
  background: var(--border);
}

.swatch-accent {
  background: var(--accent);
}

.swatch-accent-dark {
  background: var(--accent-dark);
}

.swatch-text {
  background: var(--text);
}

.swatch-muted {
  background: var(--text-muted);
}

.swatch-success {
  background: var(--success);
}

.swatch-warn {
  background: var(--warn);
}

.swatch-error {
  background: var(--error);
}

.swatch-cta {
  background: var(--cta);
}

.preview-footer {
  padding-top: 72px;
  padding-bottom: 28px;
  background: var(--hero-deep);
  color: var(--hero-ink);
}

@keyframes config-drift {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(12px, -15px, 0);
  }
}

@media (max-width: 1200px) {
  .floating-config {
    display: none;
  }
}

@media (max-width: 900px) {
  .feature-workbench {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-rail {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
  }

  .feature-rail [role="tab"] {
    min-width: 205px;
    flex: 0 0 auto;
  }

  .swatch-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .download-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .download-actions .button {
    width: 100%;
  }

  .article-download-guide {
    grid-template-columns: minmax(0, 1fr);
  }

  .dl-fab {
    right: 16px;
    bottom: 16px;
  }

  .swatch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-hero {
    min-height: auto;
    padding-bottom: 84px;
  }

  .hero-core {
    padding-top: 108px;
  }

  .hero-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .import-row {
    flex-direction: column;
  }

  .import-button {
    width: 100%;
  }

  .import-field {
    padding: 14px;
  }

  .platform-row {
    flex-direction: row;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-config {
    animation: none;
  }
}