/* 导税台 · 服务专区紧凑行
 * 只作用于 services.html 的 #deskFloors，不改 site.css（全站共用）。
 * 目标：一屏 8~12 行、行内信息一眼扫完；专区说明收成一行，悬停整行展开。
 */

/* ---------- 楼层内的搜索条 ---------- */
.ds-fsearch {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px;
}
.ds-fsearch input {
  flex: 1; min-width: 0; height: 38px; padding: 0 12px;
  font-family: inherit; font-size: 13.5px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 1px 2px rgba(14, 53, 96, .03);
}
.ds-fsearch input:focus {
  outline: none; border-color: var(--blue-l);
  box-shadow: 0 0 0 3px rgba(29, 78, 132, .08);
}
.ds-fc { flex: none; font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* ---------- 二级分组（只有 g3 特约服务有） ---------- */
.ds-group { margin: 22px 0 4px; }
.ds-group:first-of-type { margin-top: 6px; }
.ds-group-h {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 10px; border-left: 3px solid #b8935a;
  background: #f7f9fc; border-radius: 0 6px 6px 0;
}
.ds-group-h b { font-size: 14px; font-weight: 800; color: var(--blue); }
.ds-group-d {
  flex: 1; min-width: 0; font-size: 12px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ds-group-c { flex: none; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

/* ---------- 专区 ---------- */
.ds-zone { margin: 6px 0 12px; }
.ds-zone-hd {
  display: flex; align-items: baseline; gap: 8px;
  padding: 5px 10px 5px 2px;
}
.ds-zone-nm { flex: none; font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.ds-zone-tag {
  flex: none; font-style: normal; font-size: 11px; font-weight: 500;
  padding: 1px 7px; color: #8a6420; background: var(--gold-l); border-radius: 4px;
}
.ds-zone-hot {
  flex: none; font-size: 11px; padding: 1px 6px;
  color: var(--red); background: #fdeeec; border-radius: 4px;
}
.ds-zone-c { flex: none; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
/* 说明默认一行省略；鼠标悬停在专区标题行时展开成两行以内，不占常态高度 */
.ds-zone-d {
  flex: 1; min-width: 0; font-size: 12px; color: #8a94a6; line-height: 1.6;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ds-zone-hd:hover .ds-zone-d,
.ds-zone-hd:focus-within .ds-zone-d {
  white-space: normal; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}

/* ---------- 专区折叠 ----------
 * 80 个专区全摊开要滚很久，默认只留标题行；命中搜索时由 JS 临时全展开。
 * 只在可折叠专区（≥4 项，JS 加了 role="button"）上给可点手势：
 * 3 项的专区给了手型却点不动，比不给更让人困惑。
 */
.ds-zone-hd[role="button"] {
  cursor: pointer; border-radius: 6px;
  transition: background .12s, color .12s;
}
.ds-zone-hd[role="button"]:hover { background: #f7fbff; }
.ds-zone-hd[role="button"]:focus-visible {
  outline: 2px solid var(--blue-l); outline-offset: -2px;
}
.ds-zone-tgl {
  flex: none; min-width: 12px; text-align: center;
  font-size: 13px; line-height: 1; color: var(--ink-3);
  transform-origin: 50% 50%;
  transition: transform .18s ease, color .12s;
}
.ds-zone-hd[role="button"]:hover .ds-zone-tgl { color: var(--blue); }
/* 收起时箭头朝右（›），展开时转 90° 朝下 */
.ds-zone:not(.is-collapsed) .ds-zone-tgl { transform: rotate(90deg); }
.ds-zone.is-collapsed .ds-zone-body { display: none; }

/* 展开时轻微下沉淡入，让「刚点开」有反馈；折叠态不走这段（元素是 none） */
.ds-zone-body { animation: ds-zone-in .18s ease; }
@keyframes ds-zone-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ds-zone-body { animation: none; }
  .ds-zone-tgl { transition: none; }
}

/* 全局展开/收起：复用 .nats 的胶囊按钮样式，这里只补位置 */
.ds-foldbar { justify-content: flex-end; margin: -8px 0 12px; }

/* ---------- 服务项：一行一项 ---------- */
.ds-row {
  display: flex; align-items: center; gap: 8px;
  min-height: 34px; padding: 5px 12px;
  border-bottom: 1px solid #eef2f7;
  color: inherit; text-decoration: none;
  transition: background .12s, border-color .12s;
}
.ds-zone .ds-row:first-of-type { border-top: 1px solid #eef2f7; }
.ds-row:hover { background: #f7fbff; text-decoration: none; border-bottom-color: #dbe7f3; }
.ds-row:focus-visible { outline: 2px solid var(--blue-l); outline-offset: -2px; }

.ds-nm {
  flex: 0 1 auto; min-width: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ds-nm mark { background: #fff1b8; color: inherit; border-radius: 2px; padding: 0 1px; }

/* 子项小标签：小号、灰底，只在数据里声明了才出现 */
.ds-subs { display: flex; flex: none; gap: 4px; }
.ds-s {
  font-style: normal; font-size: 10.5px; line-height: 1.5;
  padding: 0 5px; color: #5f6f85; background: #f1f4f8;
  border: 1px solid #e6ecf3; border-radius: 4px; white-space: nowrap;
}
.ds-s-extend { color: #7a5b16; background: #fbf4e6; border-color: #efe0c4; }
.ds-s-cancel { color: #8a4747; background: #fbefef; border-color: #f0dede; }

.ds-tag {
  flex: none; font-style: normal; font-size: 11px; padding: 0 6px;
  color: #7a5b16; background: var(--gold-l); border-radius: 4px; white-space: nowrap;
}
.ds-go { flex: none; margin-left: auto; font-size: 12px; font-weight: 600; color: #17477c; white-space: nowrap; }

/* ---------- 免费工具（不占服务项名额） ---------- */
.ds-tools { margin: 10px 0 0; }
.ds-tool {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border: 1px dashed #cfd9e4; border-radius: 8px;
  background: #fbfdff; color: inherit; text-decoration: none;
}
.ds-tool:hover { border-color: var(--blue-l); text-decoration: none; }
.ds-tool-l { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ds-tool-b {
  font-style: normal; font-size: 10.5px; padding: 1px 6px;
  color: #0E3560; background: #e9f1fa; border-radius: 4px;
}
.ds-tool-l b { font-size: 13.5px; color: var(--ink); }
.ds-tool-d { font-size: 12px; color: var(--ink-3); flex: 1 1 240px; }

/* ---------- 空态 ---------- */
.ds-fempty, .ds-none {
  margin: 10px 0 0; padding: 18px 16px;
  font-size: 13px; color: var(--ink-3); line-height: 1.7;
  background: #fff; border: 1px dashed #cfd9e4; border-radius: 8px;
}
.ds-none { display: flex; flex-direction: column; gap: 4px; }
.ds-none b { font-size: 14px; color: var(--ink); }

/* ---------- 平板 ---------- */
@media (max-width: 900px) {
  .ds-zone-d { display: none; }
  .ds-group-d { display: none; }
}

/* ---------- 手机：一行一项，标签换行不撑破 ---------- */
@media (max-width: 600px) {
  /* 锚点胶囊在手机上排成 3 行会盖住楼层标题（.zn-chips 是 site.css 的吸顶条，
     这里只覆盖手机断点）：改成单行横滑，钉在 56px 的头部下面 */
  .zn-chips {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    top: 56px; margin: 0 -16px 8px; padding: 8px 16px;
    scrollbar-width: none;
  }
  .zn-chips::-webkit-scrollbar { display: none; }
  .zn-chips a { flex: none; }
  .zn-floor { scroll-margin-top: 118px; }
  .zn-floor-hd { flex-wrap: wrap; gap: 8px; }
  .zn-floor-c { margin-left: 0; }
  .ds-fsearch input { height: 40px; font-size: 15px; }
  .ds-row {
    flex-wrap: wrap; align-items: flex-start;
    gap: 2px 8px; padding: 9px 10px; min-height: 0;
  }
  /* 服务名与「找机构」同一行（名字可折行），子项标签单独一行，避免每项占三行 */
  .ds-nm {
    flex: 1 1 auto; font-size: 14px;
    white-space: normal; overflow: visible; text-overflow: clip;
    word-break: break-word;
  }
  .ds-subs { order: 2; flex-basis: 100%; flex-wrap: wrap; }
  .ds-tag { order: 2; }
  .ds-go { order: 1; margin-left: auto; font-size: 12px; }
  .ds-tool { flex-wrap: wrap; }
  .ds-tool-d { flex-basis: 100%; }
  .ds-zone-hd { padding-left: 0; }
  /* 手机上搜索框较高，负边距 -8px 会把按钮压到框线上 */
  .ds-foldbar { margin: -2px 0 10px; }
}

/* ---------- 搜索直达服务商（2026-11-14） ----------
   搜索命中时嵌在主命中行下方的服务商块，与 .ds-row 同一信息密度：
   机构名 + 地段 + 角标 + 该家报价，一眼扫完。 */
.ds-inline {
  margin: 2px 0 10px 10px;
  padding: 8px 12px 6px;
  border: 1px solid #dbe7f3;
  border-left: 3px solid var(--blue);
  background: #f7fbff;
  border-radius: 0 8px 8px 0;
}
.ds-inline-hd { display: flex; align-items: baseline; gap: 8px; }
.ds-inline-t { font-size: 13px; font-weight: 700; color: var(--ink); }
.ds-inline-c { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.ds-inline-more {
  flex: none; margin-left: auto;
  font-size: 12px; font-weight: 600; color: #17477c; white-space: nowrap;
}
.ds-inline-more:hover { text-decoration: underline; }
.ds-inline-price { margin: 3px 0 2px; font-size: 12.5px; color: #17477c; }
.ds-inline-p {
  display: flex; align-items: baseline; gap: 6px;
  padding: 5px 0; border-bottom: 1px solid #e7eef6;
  font-size: 13px; min-width: 0;
}
.ds-inline-p:last-child { border-bottom: 0; }
/* 可点行（2026-11-15）：有 uuid 时整行是 <a>。只加 hover 与指针，
   不改 padding / 行高 / 分隔线，避免 10 行块整体错位。
   文字颜色与排版一律沿用原来的，机构是 <a> 但不做成蓝色链接——
   这里是列表行，不是文章里的超链接。 */
.ds-inline-p.is-link { color: inherit; text-decoration: none; }
.ds-inline-p.is-link:hover { background: #eef5fd; }
.ds-inline-p.is-link::after {
  content: '›'; flex: none; margin-left: 2px;
  font-size: 12px; line-height: 1; color: #c3ccd9;
}
.ds-inline-pn {
  flex: none; max-width: 55%;
  font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ds-inline-loc { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.ds-inline-badge {
  flex: none; font-size: 11px; padding: 0 5px; border-radius: 3px;
  border: 1px solid; font-style: normal; line-height: 1.6;
}
/* 联盟角标用与 .ds-s-extend 同系的暖金色：付费身份，一眼可辨 */
.ds-inline-union { color: #7a5b16; background: #fbf4e6; border-color: #e6d3a3; }
/* 「广告」角标用中性灰：标注必须看得见，但不做成吸睛的营销标签（同 providers.js 的 .admark-a） */
.ds-inline-ad { color: #8a94a6; background: #f3f5f8; border-color: #dde4ee; }
.ds-inline-pp {
  flex: none; margin-left: auto;
  font-size: 12.5px; font-weight: 600; color: #17477c; white-space: nowrap;
}
/* 「立即下单」（2026-11-17）：价格旁的购买按钮。主蓝底白字，比行内其它元素
   都重一档 —— 这是本块唯一的转化入口，必须一眼能找到。
   嵌在行链接里也要保持可点：靠 stopPropagation 截冒泡（见 desk.js/site.js）。 */
.ds-inline-buy {
  flex: none; margin-left: 8px;
  padding: 3px 12px; border-radius: 4px;
  font-size: 12px; font-weight: 600; line-height: 1.6;
  color: #fff; background: var(--blue); text-decoration: none; white-space: nowrap;
}
.ds-inline-buy:hover { background: var(--blue-d); text-decoration: none; }
.ds-inline-tip, .ds-inline-empty { padding: 3px 0 4px; font-size: 12.5px; color: var(--ink-3); }

/* 「其他类似项目」清单（2026-11-16）：主命中块之后的可展开列表。
   行点击就地展开服务商（展开块复用 .ds-inline 系列），行本身不是链接——
   跳需求大厅的路由在楼层命中行（仍是 <a href="./demand.html">）与
   展开块末尾的「进入专区 ›」上。 */
.ds-similar {
  margin: 2px 0 10px; padding: 6px 10px 2px;
  font-size: 12.5px; color: #17477c;
  background: #f2f7fc; border-radius: 6px;
}
.ds-similar-hd { font-size: 12.5px; color: #17477c; margin-bottom: 2px; }
.ds-similar-item { border-bottom: 1px solid #e3ecf5; }
.ds-similar-item:last-child { border-bottom: 0; }
.ds-similar-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 2px; cursor: pointer; border-radius: 4px;
}
.ds-similar-row:hover { background: #e9f1fa; }
.ds-similar-row:focus-visible { outline: 2px solid var(--blue-l); outline-offset: -2px; }
.ds-similar-n {
  flex: 1; min-width: 0; font-size: 13px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ds-similar-z {
  flex: none; font-size: 11px; color: var(--ink-3);
  background: #eaf1f8; border-radius: 4px; padding: 1px 8px; white-space: nowrap;
}
/* 展开/收起指示：与 .ds-zone-tgl 同一套语言（收起朝右，展开转 90° 朝下） */
.ds-similar-ar {
  flex: none; font-size: 13px; line-height: 1; color: var(--ink-3);
  transform-origin: 50% 50%; transition: transform .18s ease;
}
.ds-similar-ar.is-open { transform: rotate(90deg); }
/* 展开块：与主命中内嵌块同构（.ds-inline 系列），这里只把左边距收回 */
.ds-similar-item .ds-inline { margin-left: 0; }
.ds-similar-go {
  display: block; margin-top: 4px; padding-top: 6px;
  border-top: 1px solid #e7eef6;
  font-size: 12px; font-weight: 600; color: #17477c; text-decoration: none;
}
.ds-similar-go:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  .ds-similar-ar { transition: none; }
}

@media (max-width: 600px) {
  .ds-inline { margin-left: 0; }
  .ds-inline-p { flex-wrap: wrap; gap: 2px 8px; }
  .ds-inline-pn { max-width: 100%; }
  .ds-inline-pp { margin-left: 0; }
}
