/* ============================================================
 * 中个标 · 宝藏频道子页公共样式（query/taxpayer/no-crime/license/standards）
 * 只写频道私有样式；通用 token / 按钮 / 卡片基类复用 common/styles.css。
 * ============================================================ */

/* ---- 频道子导航（横向可滚动，375px 不溢出） ----
 * min-width:0 + width:100%：body 是纵向 flex 容器，子项会被内容撑宽导致整页溢出，显式约束 */
.tr-subnav {
    display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    width: 100%; min-width: 0; max-width: 1080px;
    padding: 14px 20px 2px; margin: 0 auto; scrollbar-width: none;
}
.tr-subnav::-webkit-scrollbar { display: none; }
.tr-subnav a {
    flex: 0 0 auto; font-size: 13.5px; font-weight: 700; color: var(--text-2);
    text-decoration: none; padding: 9px 16px; min-height: 38px;
    display: inline-flex; align-items: center; white-space: nowrap;
    border-radius: 999px; background: #fff; border: 1px solid var(--line);
    transition: color .2s, border-color .2s, background .2s;
}
.tr-subnav a:hover { color: var(--primary); border-color: rgba(230,0,18,.3); }
.tr-subnav a.on {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; border-color: transparent;
}

/* ---- 页头 ---- */
.tr-page-head { text-align: center; padding: 26px 16px 4px; }
.tr-page-head h1 { font-size: clamp(19px, 4.2vw, 24px); font-weight: 800; }
.tr-page-head h1 em { font-style: normal; color: var(--primary); }
.tr-page-head .sub { margin-top: 8px; font-size: 13px; color: var(--text-3); letter-spacing: .05em; }

/* ---- 工具条（搜索 + 下拉筛选） ---- */
.tr-toolbar { display: flex; gap: 10px; margin: 18px 0 10px; flex-wrap: wrap; }
.tr-search { position: relative; flex: 1 1 240px; min-width: 200px; }
.tr-search .ico {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    color: var(--text-3); display: inline-flex; pointer-events: none;
}
.tr-search input {
    width: 100%; min-height: var(--tap);
    border: 1px solid var(--line); border-radius: 999px; background: #fff;
    padding: 10px 16px 10px 42px; font-size: 14.5px; color: var(--ink);
    outline: none; font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.tr-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(230,0,18,.1); }
.tr-search input::placeholder { color: var(--text-3); }
.tr-select {
    min-height: var(--tap); max-width: 100%;
    border: 1px solid var(--line); border-radius: 999px; background: #fff;
    padding: 10px 16px; font-size: 14px; color: var(--ink);
    cursor: pointer; outline: none; font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.tr-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(230,0,18,.1); }

/* ---- 级别/区域 Tab ---- */
.tr-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 10px; }
.tr-tab {
    min-height: 38px; padding: 8px 18px; font-family: inherit; cursor: pointer;
    border-radius: 999px; border: 1px solid var(--line); background: #fff;
    color: var(--text-2); font-size: 13.5px; font-weight: 700;
    transition: color .2s, border-color .2s, background .2s;
}
.tr-tab:hover { color: var(--primary); border-color: rgba(230,0,18,.3); }
.tr-tab.on {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; border-color: transparent;
}

/* ---- 结果元信息 ---- */
.tr-meta {
    display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
    margin: 2px 2px 12px; font-size: 12.5px; color: var(--text-3); flex-wrap: wrap;
}
.tr-meta .cnt { font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---- 表格页（小屏横向滚动，实测不溢出） ---- */
.twrap {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
.tr-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tr-table th {
    background: var(--accent-light); color: var(--accent);
    text-align: left; font-size: 13px; font-weight: 700;
    padding: 12px 14px; white-space: nowrap;
}
.tr-table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.7; }
.tr-table tbody tr { transition: background .15s; }
.tr-table tbody tr:hover { background: rgba(230,0,18,.025); }
.tr-table .td-item { font-weight: 600; color: var(--ink); min-width: 210px; }
.tr-table .td-muted { color: var(--text-2); }
.tr-table .ta-c { text-align: center; white-space: nowrap; }
.tr-table .btn.sm { min-height: 34px; padding: 6px 14px; font-size: 12.5px; }

/* ---- 卡片页 ---- */
.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tr-card {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 18px 18px 16px;
    display: flex; flex-direction: column; gap: 10px;
    transition: box-shadow .2s, border-color .2s;
}
.tr-card:hover { box-shadow: var(--shadow); border-color: rgba(230,0,18,.18); }
.tr-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tr-card-head h3 { font-size: 15.5px; font-weight: 800; line-height: 1.45; word-break: break-word; }
.tr-card-head .tag { flex: 0 0 auto; margin-top: 2px; }
.tr-card p { font-size: 13px; color: var(--text-2); line-height: 1.8; }
.tr-card .steps { white-space: pre-line; }
.tr-card-foot { margin-top: auto; display: flex; justify-content: flex-end; padding-top: 4px; }
.tr-card-foot .btn.sm { min-height: 36px; padding: 6px 16px; font-size: 12.5px; }

/* ---- 分组标题（区域/级别） ---- */
.tr-group-title {
    font-size: 15px; font-weight: 800; color: var(--ink);
    margin: 20px 0 10px; padding-left: 10px; border-left: 3px solid var(--primary);
    display: flex; align-items: baseline; gap: 8px;
}
.tr-group-title .g-cnt { font-size: 12px; color: var(--text-3); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- 加载/错误/空态 ---- */
.tr-state {
    padding: 46px 16px; text-align: center; color: var(--text-3);
    font-size: 13.5px; display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.tr-state-err p { color: var(--err); font-weight: 600; }
.tr-spin {
    width: 26px; height: 26px; border-radius: 50%;
    border: 3px solid var(--line); border-top-color: var(--primary);
    animation: tr-spin .8s linear infinite;
}
@keyframes tr-spin { to { transform: rotate(360deg); } }

/* ---- 移动端（375px 基准） ---- */
@media (max-width: 720px) {
    .tr-page-head { padding-top: 18px; }
    .tr-toolbar { flex-direction: column; }
    /* 纵向排列时 flex-basis 会作用到高度，把搜索框撑出大空白，必须复位 */
    .tr-search { flex: 0 0 auto; min-width: 0; }
    .tr-select { width: 100%; }
    .tr-grid { grid-template-columns: 1fr; gap: 12px; }
    .tr-subnav { padding: 12px 14px 2px; }
}
