/* =========================================================
   食品标准下载 · 前台样式（M3 服务端渲染版）
   无第三方依赖，纯 CSS，移动优先适配
   ========================================================= */

:root {
    --brand: #0d5c46;
    --brand-2: #127a5c;
    --brand-deep: #0a4636;
    --brand-soft: #e8f3ee;
    --accent: #b45309;
    --ink: #12211c;
    --text: #2b3a34;
    --muted: #66756f;
    --faint: #8b9892;
    --line: #dfe6e2;
    --line-soft: #edf2ef;
    --bg: #f5f8f6;
    --card: #ffffff;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(18, 33, 28, .05);
    --shadow: 0 1px 2px rgba(18, 33, 28, .04), 0 14px 36px -18px rgba(18, 33, 28, .22);
    --max: 1180px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; }

button, input, select { font: inherit; }

:focus-visible {
    outline: 2px solid var(--brand-2);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -48px;
    z-index: 100;
    padding: 8px 14px;
    background: var(--brand);
    color: #fff;
    border-radius: var(--radius-sm);
    transition: top .2s ease;
}

.skip-link:focus { top: 12px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------- 头部 ---------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-inner {
    max-width: var(--max);
    margin: 0 auto;
    min-height: 66px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-2), var(--brand-deep));
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .5px;
    box-shadow: 0 6px 14px -6px rgba(13, 92, 70, .6);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 18px; color: var(--ink); letter-spacing: .3px; }
.brand-text small { font-size: 11px; color: var(--muted); letter-spacing: 1.6px; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.nav-link {
    position: relative;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14.5px;
    white-space: nowrap;
    transition: color .18s ease, background .18s ease;
}

.nav-link:hover { color: var(--brand); background: var(--brand-soft); }

.nav-link.is-active { color: var(--brand); font-weight: 600; }

.nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    padding: 3px 3px 3px 14px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.header-search:focus-within {
    border-color: var(--brand-2);
    box-shadow: 0 0 0 3px rgba(18, 122, 92, .1);
}

.header-search input {
    width: 176px;
    padding: 5px 6px;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 13.5px;
    color: var(--ink);
}

.header-search input::placeholder { color: var(--faint); }

.header-search button {
    padding: 5px 14px;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: background .18s ease;
}

.header-search button:hover { background: var(--brand-deep); }

/* ---------------- 通用容器 ---------------- */

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

.page { padding-top: 22px; padding-bottom: 56px; }

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--brand);
    text-transform: uppercase;
}

/* ---------------- 首页 Hero ---------------- */

.hero {
    position: relative;
    padding: 58px 0 46px;
    background:
        radial-gradient(900px 340px at 18% -20%, rgba(18, 122, 92, .16), transparent 65%),
        radial-gradient(700px 300px at 88% 0%, rgba(180, 83, 9, .08), transparent 60%),
        linear-gradient(180deg, #f2f8f5 0%, #fbfdfc 72%, var(--bg) 100%);
    border-bottom: 1px solid var(--line-soft);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(13, 92, 70, .10) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 70%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 70%);
}

.hero .container { position: relative; z-index: 1; }

.hero-copy { max-width: 720px; }

.hero h1 {
    margin: 10px 0 12px;
    font-size: 42px;
    line-height: 1.18;
    letter-spacing: -.8px;
    color: var(--ink);
    font-weight: 800;
}

.hero-copy p {
    margin: 0;
    max-width: 640px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
}

.hero-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 30px 0 0;
    padding: 9px 9px 9px 20px;
    max-width: 820px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 16px;
    color: var(--ink);
    padding: 8px 0;
}

.hero-search input::placeholder { color: var(--faint); }

.hero-search select {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    padding: 8px 10px;
    outline: none;
    cursor: pointer;
    border-left: 1px solid var(--line);
    border-radius: 0;
}

.hero-search button {
    flex-shrink: 0;
    padding: 11px 26px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 18px -8px rgba(13, 92, 70, .55);
    transition: transform .18s ease, box-shadow .18s ease;
}

.hero-search button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px -10px rgba(13, 92, 70, .6);
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid rgba(13, 92, 70, .12);
    max-width: 820px;
}

.stat { display: flex; flex-direction: column; gap: 2px; }

.stat strong {
    font-size: 26px;
    font-weight: 800;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.5px;
}

.stat span { font-size: 12.5px; color: var(--muted); letter-spacing: .4px; }

/* ---------------- 首页区块 ---------------- */

.home-body { padding-top: 42px; padding-bottom: 20px; }

.section { margin-bottom: 44px; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.section-head h2 {
    margin: 0;
    font-size: 21px;
    letter-spacing: -.2px;
    color: var(--ink);
    font-weight: 700;
}

.section-desc {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13.5px;
}

.section-link {
    flex-shrink: 0;
    font-size: 13.5px;
    color: var(--brand);
    font-weight: 500;
}

.section-link:hover { text-decoration: underline; }

.section-head h2 .count {
    font-size: 14px;
    color: var(--muted);
    font-weight: 400;
}

.category-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    padding: 24px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.category-group-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
}

.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot--green { background: var(--brand-2); }
.dot--blue { background: #2563eb; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    line-height: 1.3;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.chip:hover {
    border-color: rgba(18, 122, 92, .45);
    background: var(--brand-soft);
    color: var(--brand-deep);
}

.chip em {
    font-style: normal;
    font-size: 11.5px;
    color: var(--faint);
    font-variant-numeric: tabular-nums;
    padding-left: 2px;
}

.chip--tag { background: var(--brand-soft); border-color: transparent; }

.chips--panel .chip { background: #fafcfb; }

/* ---------------- 列表行 ---------------- */

.doc-list {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.doc-row {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line-soft);
    transition: background .16s ease;
}

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

.doc-row:hover { background: #fafcfb; }

.doc-row--law { grid-template-columns: minmax(0, 1fr) auto; }

.doc-no {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--brand);
    letter-spacing: -.2px;
    overflow-wrap: anywhere;
}

.doc-main { min-width: 0; }

.doc-main h3 {
    margin: 0 0 4px;
    font-size: 15.5px;
    line-height: 1.5;
    font-weight: 600;
    color: var(--ink);
}

.doc-main h3 a { transition: color .16s ease; }
.doc-main h3 a:hover { color: var(--brand); }

.doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.5;
}

.doc-meta span { position: relative; }
.doc-meta span + span::before {
    content: "·";
    position: absolute;
    left: -9px;
    color: var(--line);
}

.doc-side {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.doc-row--compact .doc-meta { gap: 6px 12px; }

/* ---------------- 徽标与按钮 ---------------- */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    letter-spacing: .2px;
}

.badge--ok { background: #e7f5ed; color: #0c6b45; }
.badge--warn { background: #fdf1e3; color: #a15208; }
.badge--off { background: #eef0ef; color: #6b7772; }
.badge--info { background: #e8effc; color: #2456ae; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
    white-space: nowrap;
}

.btn--sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }

.btn--primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 8px 18px -10px rgba(13, 92, 70, .6);
}
.btn--primary:hover { background: var(--brand-deep); }

.btn--ghost {
    background: #fff;
    border-color: var(--line);
    color: var(--text);
}
.btn--ghost:hover { border-color: var(--brand-2); color: var(--brand); }

.btn--block { width: 100%; }

.btn--disabled {
    background: #eef1f0;
    color: var(--faint);
    cursor: not-allowed;
    box-shadow: none;
}

/* ---------------- 首页分栏 ---------------- */

.home-split {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 26px;
    margin-bottom: 44px;
}

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.panel-head h2 { margin: 0; font-size: 17px; color: var(--ink); font-weight: 700; }
.panel-head a { font-size: 12.5px; color: var(--brand); }

.compact-list { display: flex; flex-direction: column; }

.compact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
    transition: color .16s ease;
}
.compact-row:last-child { border-bottom: 0; }
.compact-row:hover .compact-title { color: var(--brand); }

.compact-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.compact-title {
    font-size: 14px;
    color: var(--ink);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .16s ease;
}

.compact-meta { font-size: 12px; color: var(--faint); }
.compact-meta em { font-style: normal; }

.panel-note {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
    color: var(--faint);
    font-size: 12.5px;
}

/* ---------------- 内页头部与面包屑 ---------------- */

.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 12.5px;
}

.crumbs a:hover { color: var(--brand); }
.crumb-sep { color: #c7d0cc; }

.page-head { margin-bottom: 24px; }

.page-head h1 {
    margin: 6px 0 8px;
    font-size: 30px;
    line-height: 1.25;
    letter-spacing: -.5px;
    color: var(--ink);
    font-weight: 800;
}

.page-head p { margin: 0; color: var(--muted); font-size: 14px; max-width: 760px; }

/* ---------------- 列表页布局 ---------------- */

.layout {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.sidebar { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 16px; }

.side-block {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.side-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--faint);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.side-links { display: flex; flex-direction: column; gap: 2px; }

.side-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 9px;
    border-radius: 7px;
    color: var(--text);
    font-size: 13.5px;
    transition: background .16s ease, color .16s ease;
}

.side-link em { font-style: normal; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }

.side-link:hover { background: var(--brand-soft); color: var(--brand-deep); }

.side-link.is-active {
    background: var(--brand-soft);
    color: var(--brand-deep);
    font-weight: 600;
}

.side-links--cats .side-link { padding: 5px 8px; }

.content-col { min-width: 0; }

/* ---------------- 筛选 ---------------- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.filter-item { display: flex; flex-direction: column; gap: 4px; }

.filter-item label {
    font-size: 11.5px;
    color: var(--faint);
    letter-spacing: .4px;
}

.filter-item select {
    min-width: 112px;
    padding: 7px 30px 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background-color: #fff;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
}

.filter-item select:focus { border-color: var(--brand-2); outline: none; }

.filter-reset { font-size: 12.5px; color: var(--muted); padding-bottom: 8px; }
.filter-reset:hover { color: var(--brand); }

.result-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12.5px;
}

.result-tip { color: var(--accent); }

/* ---------------- 详情页 ---------------- */

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 318px;
    gap: 30px;
    align-items: start;
}

.detail-main {
    min-width: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: var(--shadow-sm);
}

.detail-head { padding-bottom: 20px; border-bottom: 1px solid var(--line-soft); }

.detail-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12.5px;
    margin-bottom: 10px;
}

.detail-head h1 {
    margin: 0 0 8px;
    font-size: 27px;
    line-height: 1.4;
    letter-spacing: -.3px;
    color: var(--ink);
    font-weight: 800;
}

.detail-title-en {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.6;
}

.detail-no {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--brand-soft);
    color: var(--brand-deep);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
}

.detail-section { padding-top: 22px; }

.detail-section h2 {
    position: relative;
    margin: 0 0 14px;
    padding-left: 11px;
    font-size: 17px;
    color: var(--ink);
    font-weight: 700;
}

.detail-section h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    border-radius: 2px;
    background: var(--brand-2);
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    background: var(--line-soft);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    overflow: hidden;
}

.meta-item {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    background: #fff;
}

.meta-item dt {
    flex-shrink: 0;
    width: 72px;
    color: var(--faint);
    font-size: 12.5px;
}

.meta-item dd {
    margin: 0;
    min-width: 0;
    color: var(--text);
    font-size: 13.5px;
    overflow-wrap: anywhere;
}

.prose {
    color: var(--text);
    font-size: 15px;
    line-height: 1.95;
    overflow-wrap: break-word;
}

.prose p { margin: 0 0 1em; }

.prose h2, .prose h3, .prose h4 {
    margin: 1.4em 0 .6em;
    color: var(--ink);
    font-weight: 700;
}

.prose h2 { font-size: 19px; }
.prose h3 { font-size: 17px; }
.prose h4 { font-size: 15.5px; }

.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.6em; }

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 13.5px;
}

.prose table th, .prose table td {
    border: 1px solid var(--line);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.prose table th { background: #f7faf8; font-weight: 600; }

.prose blockquote {
    margin: 1em 0;
    padding: 10px 16px;
    border-left: 3px solid var(--brand-2);
    background: #f8fbf9;
    color: var(--muted);
}

.prose img { border-radius: 8px; }

.prose--plain { color: var(--text); }

.note {
    margin-top: 12px;
    color: var(--faint);
    font-size: 12.5px;
    line-height: 1.8;
}

.note a { color: var(--brand); }

/* ---------------- 详情侧栏 ---------------- */

.detail-side {
    position: sticky;
    top: 86px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.download-card {
    background: linear-gradient(165deg, #0e6049 0%, var(--brand-deep) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 18px 36px -20px rgba(13, 92, 70, .6);
}

.download-label {
    font-size: 11.5px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .6);
}

.download-no {
    margin: 6px 0 14px;
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.3px;
    overflow-wrap: anywhere;
}

.download-card .btn--primary {
    background: #fff;
    color: var(--brand-deep);
    box-shadow: none;
}
.download-card .btn--primary:hover { background: #f0f8f4; }

.download-card .btn--disabled {
    background: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .6);
}

.download-tip {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, .62);
    font-size: 12px;
    line-height: 1.7;
}

.text-link {
    display: inline-block;
    margin-top: 12px;
    color: rgba(255, 255, 255, .85);
    font-size: 12.5px;
    border-bottom: 1px solid rgba(255, 255, 255, .3);
}
.text-link:hover { color: #fff; }

.side-block--card { padding: 16px; }

/* ---------------- 附件 ---------------- */

.attachment-list { display: flex; flex-direction: column; gap: 8px; }

.attachment {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fafcfb;
    transition: border-color .16s ease, background .16s ease;
}

.attachment:hover { border-color: var(--brand-2); background: var(--brand-soft); }

.attachment-ext {
    flex-shrink: 0;
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--brand);
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
}

.attachment-name { font-size: 13.5px; overflow-wrap: anywhere; }

/* ---------------- 搜索页 ---------------- */

.search-page { padding-top: 30px; }

.search-head {
    padding: 26px 28px 24px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(600px 200px at 10% -30%, rgba(18, 122, 92, .14), transparent 65%),
        #fff;
    box-shadow: var(--shadow-sm);
}

.search-head h1 {
    margin: 0 0 16px;
    font-size: 25px;
    line-height: 1.35;
    letter-spacing: -.4px;
    color: var(--ink);
}

.search-form {
    display: flex;
    gap: 8px;
    max-width: 760px;
}

.search-form input {
    flex: 1;
    min-width: 0;
    padding: 11px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.search-form input:focus {
    border-color: var(--brand-2);
    box-shadow: 0 0 0 3px rgba(18, 122, 92, .1);
}

.search-form select {
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--muted);
    font-size: 13.5px;
    cursor: pointer;
}

.search-form button {
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.search-form button:hover { background: var(--brand-deep); }

.search-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.search-tab {
    position: relative;
    padding: 9px 14px 11px;
    color: var(--muted);
    font-size: 14px;
    transition: color .16s ease;
}

.search-tab:hover { color: var(--brand); }

.search-tab.is-active { color: var(--brand-deep); font-weight: 600; }

.search-tab.is-active::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: -1px;
    height: 2px;
    background: var(--brand);
}

.search-tab em {
    margin-left: 5px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-style: normal;
    font-size: 11px;
}

.exact-card {
    margin-bottom: 22px;
    padding: 16px 20px;
    border: 1px solid rgba(18, 122, 92, .28);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #f4faf7, #fff);
}

.exact-label {
    margin-bottom: 8px;
    color: var(--brand);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.exact-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.exact-main h2 { margin: 0 0 4px; font-size: 17px; line-height: 1.5; color: var(--ink); }
.exact-main h2 a:hover { color: var(--brand); }
.exact-main p { margin: 0; color: var(--muted); font-size: 12.5px; }

.search-section { margin-bottom: 36px; }

.search-suggest { padding: 8px 0 20px; }

.search-suggest .side-title { margin-top: 18px; }

.empty-state {
    padding: 44px 24px;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.empty-state--slim { padding: 30px 24px; }

.empty-state--tall { padding: 56px 24px; }

.empty-icon, .empty-code {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 20px;
    font-weight: 800;
}

.empty-code { width: auto; height: auto; padding: 2px 12px; border-radius: 10px; font-size: 26px; font-family: var(--mono); }

.empty-state strong { display: block; font-size: 16px; color: var(--ink); margin-bottom: 4px; }

.empty-state p { margin: 0; color: var(--muted); font-size: 13.5px; }

.empty-state p a { color: var(--brand); }

.empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 18px 0 6px;
}

/* ---------------- 分页 ---------------- */

.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
}

.pager-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    transition: border-color .16s ease, color .16s ease, background .16s ease;
}

.pager-link:hover { border-color: var(--brand-2); color: var(--brand); }

.pager-link.is-current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 600;
}

.pager-total { margin-left: auto; color: var(--faint); font-size: 12.5px; }

/* ---------------- 页脚 ---------------- */

.site-footer {
    margin-top: 20px;
    background: #12241d;
    color: rgba(255, 255, 255, .72);
}

.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 34px 24px 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-about { max-width: 460px; }

.footer-brand { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 6px; }

.footer-about p { margin: 0; font-size: 12.5px; line-height: 1.8; color: rgba(255, 255, 255, .58); }

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }

.footer-links a { font-size: 13px; color: rgba(255, 255, 255, .72); }
.footer-links a:hover { color: #fff; }

.footer-bottom {
    max-width: var(--max);
    margin: 0 auto;
    padding: 14px 24px 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .46);
    font-size: 12px;
}

.footer-bottom--center { justify-content: center; border-top: 0; }

/* ---------------- 响应式 ---------------- */

@media (max-width: 1080px) {
    .header-search input { width: 138px; }
    .layout { grid-template-columns: 210px minmax(0, 1fr); gap: 22px; }
    .detail-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; }
}

@media (max-width: 920px) {
    .header-inner { flex-wrap: wrap; gap: 10px 20px; padding: 12px 20px; }
    .header-search { order: 3; margin-left: 0; flex: 1 1 100%; }
    .header-search input { width: 100%; }
    .hero h1 { font-size: 34px; }
    .category-panel { grid-template-columns: 1fr; gap: 20px; }
    .home-split { grid-template-columns: 1fr; }
    .layout, .detail-layout { grid-template-columns: 1fr; }
    .sidebar, .detail-side { position: static; }
    .sidebar { order: 2; }
    .side-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-main { padding: 24px; }
}

@media (max-width: 720px) {
    .container { padding: 0 16px; }
    .header-inner { padding: 10px 16px; }
    .site-nav { gap: 0; overflow-x: auto; }
    .nav-link { padding: 6px 9px; font-size: 13.5px; }
    .brand-text small { display: none; }
    .hero { padding: 40px 0 34px; }
    .hero h1 { font-size: 29px; }
    .hero-copy p { font-size: 14.5px; }
    .hero-search { flex-wrap: wrap; padding: 10px; border-radius: 16px; }
    .hero-search input { flex: 1 1 100%; padding: 8px; }
    .hero-search select { flex: 0 0 auto; border-left: 0; border-top: 1px solid var(--line); border-radius: 0; }
    .hero-search button { flex: 1; }
    .hero-stats { gap: 24px; }
    .stat strong { font-size: 22px; }
    .page-head h1 { font-size: 24px; }
    .doc-row { grid-template-columns: 1fr; gap: 8px; padding: 14px 16px; }
    .doc-row .doc-no { font-size: 12.5px; }
    .doc-side { justify-content: flex-start; flex-wrap: wrap; }
    .doc-row--law { grid-template-columns: 1fr; }
    .filter-bar { align-items: stretch; }
    .filter-item { flex: 1 1 45%; }
    .filter-item select { width: 100%; min-width: 0; }
    .filter-bar .btn { flex: 1 1 100%; }
    .filter-reset { padding-bottom: 0; }
    .meta-grid { grid-template-columns: 1fr; }
    .detail-head h1 { font-size: 21px; }
    .detail-main { padding: 20px 18px; }
    .search-form { flex-wrap: wrap; }
    .search-form input { flex: 1 1 100%; }
    .search-form select { flex: 1; padding: 9px 10px; }
    .search-form button { flex: 1; padding: 10px 16px; }
    .exact-main { flex-direction: column; align-items: flex-start; }
    .pager-total { width: 100%; margin-left: 0; margin-top: 6px; }
    .footer-inner { padding: 26px 16px 18px; }
    .footer-bottom { padding: 12px 16px 18px; }
}

@media (max-width: 480px) {
    .site-nav { width: 100%; justify-content: space-between; }
    .nav-link { padding: 6px 6px; }
    .hero-stats { flex-wrap: wrap; gap: 18px 28px; }
    .chips { gap: 6px; }
    .chip { padding: 6px 10px; font-size: 12.5px; }
    .section-head { align-items: flex-start; }
    .section-link { margin-top: 4px; }
    .meta-item { padding: 9px 12px; }
    .meta-item dt { width: 62px; }
}

@media print {
    .site-header, .site-footer, .detail-side, .sidebar, .filter-bar, .pager { display: none !important; }
    .detail-layout, .layout { display: block; }
    .detail-main { border: 0; box-shadow: none; padding: 0; }
    body { background: #fff; }
}
