:root {
  --ink: #0e2a47;
  --ink-2: #123a6b;
  --blue: #2d6cdf;
  --blue-tint: #eaf1fc;
  --orange: #f58a00;
  --orange-tint: #fff3e3;
  --red: #c6373c;
  --red-tint: #fceded;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --line: #e3e7ee;
  --text: #1c2b3a;
  --muted: #5a6b7e;
  --r-card: 14px;
  --r-ctl: 8px;
  --shadow: 0 1px 2px rgba(14, 42, 71, .05), 0 8px 24px rgba(14, 42, 71, .06);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  height: 64px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; flex: none; gap: 10px; font-weight: 700; color: var(--ink); font-size: 17px; letter-spacing: .01em; white-space: nowrap; }
.brand-logo { height: 32px; width: auto; flex: none; }
.brand-name { padding-left: 12px; border-left: 1px solid var(--line); line-height: 1.25; white-space: nowrap; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--ink-2), var(--blue));
  color: #fff; font-size: 15px; font-weight: 700;
  display: grid; place-items: center;
}
.main-nav { display: flex; flex-wrap: nowrap; align-items: center; gap: 22px; margin-left: auto; }
.main-nav a { flex: none; color: var(--muted); font-size: 14.5px; padding: 6px 2px; border-bottom: 2px solid transparent; white-space: nowrap; transition: color .2s, border-color .2s; }
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--orange); }
.nav-cta {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2f74e0, #1d55ae); color: #fff; font-size: 14px; white-space: nowrap;
  padding: 8px 18px; border-radius: var(--r-ctl); border: none;
  box-shadow: 0 6px 14px -6px rgba(45, 108, 223, .55);
  transition: background .2s, transform .1s, box-shadow .2s;
}
.nav-cta:hover { background: linear-gradient(135deg, #2a68cc, #164a9c); box-shadow: 0 8px 18px -6px rgba(45, 108, 223, .65); }
.nav-cta:active { transform: scale(.98); }
@media (max-width: 1180px) {
  .site-header .wrap { gap: 16px; }
  .main-nav { gap: 16px; }
  .brand-name { font-size: 16px; }
}

/* ---------- hero ---------- */
.hero { padding: 76px 0 60px; position: relative; overflow: hidden; background: #0b1e38; }
.hero::before {
  content: ""; position: absolute; inset: -6% -4% -10%; pointer-events: none;
  background:
    radial-gradient(720px 340px at 50% -60px, rgba(64, 140, 255, .16), transparent 70%),
    radial-gradient(520px 260px at 78% 40px, rgba(245, 138, 0, .10), transparent 70%),
    linear-gradient(180deg, rgba(8, 21, 40, .38) 0%, rgba(8, 21, 40, .10) 42%, rgba(8, 21, 40, .42) 100%),
    url("../images/hero-bg-dark.webp") center 58% / cover no-repeat;
  animation: hero-drift 28s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes hero-drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.09) translate3d(-1.2%, -1.8%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(680px 380px at 50% 0, #000 30%, transparent 75%);
  mask-image: radial-gradient(680px 380px at 50% 0, #000 30%, transparent 75%);
}
.hero .wrap { position: relative; max-width: 880px; margin: 0 auto; text-align: center; }
.ai-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(13, 32, 58, .55); border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px;
  padding: 7px 16px; font-size: 13px; color: #dbe7f6; font-weight: 600;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .5); backdrop-filter: blur(6px);
}
.ai-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #22a06b; position: relative; }
.ai-eyebrow .dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(34, 160, 107, .4); animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.ai-eyebrow .sep { color: rgba(255, 255, 255, .28); }
.hero h1 { margin-top: 22px; font-size: 46px; line-height: 1.2; color: #f4f8fd; font-weight: 700; letter-spacing: -.015em; }
.hero h1 em { font-style: normal; color: #ffb35c; }
.hero-sub { margin: 16px auto 0; color: rgba(214, 228, 244, .78); font-size: 16.5px; max-width: 34em; }

.agent-bar {
  margin-top: 28px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(11, 28, 52, .72); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--r-card); padding: 8px 8px 8px 18px;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .55); backdrop-filter: blur(8px);
  transition: border-color .2s, box-shadow .2s;
}
.agent-bar:focus-within { border-color: rgba(138, 182, 255, .65); box-shadow: 0 0 0 3px rgba(96, 165, 250, .22); }
.agent-bar .tag {
  flex: none; font-size: 12.5px; color: #cfe1ff; background: rgba(96, 165, 250, .16);
  padding: 4px 10px; border-radius: 999px; font-weight: 600;
}
.agent-bar input {
  flex: 1; border: none; outline: none; font: inherit; font-size: 15px; color: #eef4fb;
  background: transparent; min-width: 0;
}
.agent-bar input::placeholder { color: rgba(214, 228, 244, .45); }
.agent-bar button {
  flex: none; border: none; background: #f7fafc; color: #14315c;
  font-size: 14.5px; padding: 10px 22px; border-radius: 10px; font-weight: 600;
  transition: background .2s, transform .1s;
}
.agent-bar button:hover { background: #ffe9d1; }
.agent-bar button:active { transform: scale(.98); }

.agent-hero {
  margin: 36px auto 0; max-width: 760px; border-radius: 18px; padding: 2px;
  background: linear-gradient(115deg, rgba(96, 165, 250, .65), rgba(30, 64, 120, .45) 45%, rgba(255, 179, 92, .65));
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, .55);
  transition: box-shadow .25s, transform .25s;
}
.agent-hero:focus-within { box-shadow: 0 22px 54px -18px rgba(96, 165, 250, .45); }
.agent-hero .agent-bar {
  margin-top: 0; border: none; box-shadow: none; border-radius: 16px;
  padding: 12px 12px 12px 22px; gap: 12px;
}
.agent-hero .agent-bar:focus-within { box-shadow: none; }
.agent-hero .spark { flex: none; color: #ffcf8a; display: grid; place-items: center; }
.agent-hero .agent-bar input { font-size: 17px; }
.agent-hero .agent-bar button { padding: 14px 30px; font-size: 16px; border-radius: 12px; }

.hero-chips { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.hero-chips .lbl { font-size: 13px; color: rgba(214, 228, 244, .6); }
.hero-chips button {
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: rgba(233, 240, 250, .85);
  font-size: 13.5px; padding: 7px 15px; border-radius: 999px; transition: all .2s;
}
.hero-chips button:hover { border-color: rgba(255, 179, 92, .55); color: #fff; background: rgba(255, 255, 255, .12); }

.hero-caps { margin-top: 30px; display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; }
.cap { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: rgba(214, 228, 244, .75); font-weight: 500; }
.cap svg { color: #8ab6ff; flex: none; }

.hero-links { margin-top: 22px; display: flex; gap: 22px; justify-content: center; font-size: 14px; color: rgba(214, 228, 244, .6); }
.hero-links a { color: #ffd9a1; font-weight: 600; border-bottom: 1px solid transparent; transition: border-color .2s; }
.hero-links a:hover { border-bottom-color: var(--orange); }

/* ---------- libraries bento ---------- */
.libs { padding: 8px 0 72px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.sec-head h2 { font-size: 24px; color: var(--ink); font-weight: 700; }
.sec-head .sec-note { margin-top: 7px; font-size: 13px; color: var(--muted); }
.sec-head a { font-size: 14px; color: var(--blue); font-weight: 600; }
.lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 168px; gap: 16px; }
.lib-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 22px 24px; display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.lib-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #a8c6f0; }
.lib-card h3 { font-size: 19px; color: var(--ink); font-weight: 700; }
.lib-card p { margin-top: 6px; color: var(--muted); font-size: 13.5px; }
.lib-card .count { margin-top: auto; font-size: 13px; color: var(--muted); }
.lib-card .count b { font-size: 26px; color: var(--ink-2); font-weight: 700; margin-right: 4px; }
.lib-card.tall { grid-row: span 2; background: linear-gradient(160deg, var(--ink-2), #1d4f8f 68%); border-color: transparent; }
.lib-card.tall h3, .lib-card.tall .count b { color: #fff; }
.lib-card.tall p, .lib-card.tall .count { color: rgba(255, 255, 255, .78); }
.lib-card.tall::after {
  content: ""; position: absolute; right: -46px; bottom: -46px; width: 190px; height: 190px;
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(245, 138, 0, .5), rgba(245, 138, 0, 0) 68%);
}
.lib-card.wide { grid-column: span 2; background: var(--orange-tint); border-color: #f4dfc0; }

/* ---------- law impact band ---------- */
.band { background: var(--ink); color: #fff; padding: 56px 0; }
.band .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.band h2 { font-size: 26px; font-weight: 700; line-height: 1.35; }
.band p { margin-top: 12px; color: rgba(255, 255, 255, .72); font-size: 14.5px; max-width: 26em; }
.band .go {
  display: inline-block; margin-top: 22px; background: var(--orange); color: #241300;
  font-weight: 700; font-size: 14.5px; padding: 11px 24px; border-radius: var(--r-ctl);
  transition: transform .1s, filter .2s;
}
.band .go:hover { filter: brightness(1.06); }
.band .go:active { transform: scale(.98); }
.band-list { display: flex; flex-direction: column; gap: 12px; }
.band-item {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--r-card); padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
}
.band-item .law { font-size: 15px; font-weight: 600; }
.band-item .meta { margin-left: auto; font-size: 13px; color: rgba(255, 255, 255, .66); text-align: right; }
.band-item .meta b { color: var(--orange); font-size: 17px; }

/* ---------- updates ---------- */
.updates { padding: 64px 0 80px; }
.upd-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; }
.upd-grid h2 { font-size: 24px; color: var(--ink); font-weight: 700; }
.upd-grid .lead { margin-top: 12px; color: var(--muted); font-size: 14.5px; max-width: 24em; }
.upd-list { border-top: 1px solid var(--line); }
.upd-row { display: flex; gap: 20px; padding: 15px 4px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.upd-row .d { flex: none; width: 92px; color: var(--muted); font-size: 13.5px; }
.upd-row .t { color: var(--text); }
.upd-row .t b { color: var(--ink-2); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; color: var(--muted); font-size: 13px; }
.site-footer a:hover { color: var(--ink-2); }
.footer-links { display: flex; gap: 20px; margin-left: auto; }
.footer-links a { color: var(--ink-2); font-weight: 500; }
.footer-links a:hover { color: var(--orange); }

/* ---------- badges & tags ---------- */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; line-height: 1.7; }
.badge.high { color: var(--red); background: var(--red-tint); }
.badge.mid { color: #a05a00; background: var(--orange-tint); }
.badge.low { color: var(--ink-2); background: var(--blue-tint); }
.badge.none { color: #5b6472; background: #eef1f5; }
.tag-domain { display: inline-block; font-size: 12px; color: #2a63c4; background: var(--blue-tint); padding: 2px 10px; border-radius: 999px; }

/* ---------- search page ---------- */
.chat-wrap { max-width: 880px; margin: 0 auto; padding: 40px 24px 96px; }
.chat-head { margin-bottom: 26px; }
.chat-head h1 { font-size: 26px; color: var(--ink); font-weight: 700; }
.chat-head p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.msg-user {
  margin-left: auto; max-width: 78%;
  background: var(--ink-2); color: #fff; border-radius: 14px 14px 4px 14px;
  padding: 12px 18px; font-size: 15px; width: fit-content;
}
.agent-steps { margin: 22px 0 6px; display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13.5px; opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
.step.on { opacity: 1; transform: none; }
.step .dot {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--blue-tint); color: var(--ink-2); font-size: 12px; font-weight: 700;
  display: grid; place-items: center;
}
.step.done .dot { background: var(--ink-2); color: #fff; }
.answer { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px 24px; box-shadow: var(--shadow); }
.answer > p { font-size: 14.5px; color: var(--text); }
.answer .src-note { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.answer .result-sub { margin: 22px 0 0; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.risk-cards { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.risk-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; transition: border-color .2s, box-shadow .2s; background: #fff; }
.risk-card:hover { border-color: #cfd9e6; box-shadow: var(--shadow); }
.risk-card .top { display: flex; align-items: center; gap: 10px; }
.risk-card .top h4 { font-size: 15.5px; color: var(--ink); font-weight: 700; }
.risk-card .top .link { margin-left: auto; font-size: 13px; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.risk-card .top .link:hover { color: var(--orange); }
.risk-card .desc { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.risk-card .basis { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); background: var(--blue-tint); border-radius: 8px; padding: 7px 12px; display: inline-block; }
.risk-card .foot { margin-top: 10px; display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.suggests { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.suggests button {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-size: 13.5px; padding: 8px 16px; border-radius: 999px;
  transition: border-color .2s, background .2s, transform .1s;
}
.suggests button:hover { border-color: var(--blue); background: var(--blue-tint); }
.suggests button:active { transform: scale(.97); }

/* ---------- dashboard ---------- */
.dash-wrap { max-width: 1280px; margin: 0 auto; padding: 32px 24px 96px; }
.dash-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 22px; }
.dash-head h1 { font-size: 26px; color: var(--ink); font-weight: 700; }
.dash-head .mock { font-size: 12.5px; color: var(--muted); background: #eef1f5; padding: 3px 12px; border-radius: 999px; }
.dash-head .stamp { margin-left: auto; font-size: 13px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 22px; }
.kpi .label { font-size: 13px; color: var(--muted); }
.kpi .val { margin-top: 6px; font-size: 30px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.kpi .val small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.kpi .delta { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.kpi .delta b { color: var(--orange); font-weight: 700; }
.dash-grid { margin-top: 16px; display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; }
.dash-grid.single { grid-template-columns: 1fr; }
.dash-grid.trend-grid { grid-template-columns: 1.6fr 1fr; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px 22px; }
.panel h3 { font-size: 15.5px; color: var(--ink); font-weight: 700; margin-bottom: 16px; }
.donut-row { display: flex; align-items: center; gap: 26px; }
.donut {
  width: 132px; height: 132px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--red) 0 13.3%, var(--orange) 13.3% 64.7%, var(--blue) 64.7% 100%);
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 55%);
  mask: radial-gradient(circle, transparent 54%, #000 55%);
}
.legend { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; color: var(--muted); }
.legend .li { display: flex; align-items: center; gap: 10px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend b { color: var(--text); margin-left: auto; padding-left: 18px; }
.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 88px 1fr 46px; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.bar-row .fill { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--blue), var(--ink-2)); }
.bar-row.hot .fill { background: linear-gradient(90deg, var(--orange), #d97400); }
.bar-row b { color: var(--text); text-align: right; }
.trend-svg { width: 100%; height: 170px; display: block; }
.trend-legend { display: flex; gap: 20px; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.trend-legend .sw { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }

.law-feed { margin-top: 16px; }
.law-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); margin-bottom: 12px; overflow: hidden; }
.law-item > .head {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 16px 22px; background: none; border: none; font: inherit;
}
.law-item > .head:hover { background: #fafbfc; }
.law-item .name { font-size: 15px; font-weight: 700; color: var(--ink); }
.law-item .dates { font-size: 12.5px; color: var(--muted); }
.law-item .hits { margin-left: auto; font-size: 13px; color: var(--muted); }
.law-item .hits b { color: var(--orange); font-size: 16px; }
.law-item .st { flex: none; }
.law-item .st.ok { color: #1d7a4f; background: #e8f5ee; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.law-item .st.wait { color: #a05a00; background: var(--orange-tint); font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.law-item .caret { flex: none; color: var(--muted); font-size: 12px; transition: transform .2s; }
.law-item.open .caret { transform: rotate(90deg); }
.law-item .body { display: none; border-top: 1px solid var(--line); padding: 6px 22px 18px; }
.law-item.open .body { display: block; }
.impact-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.impact-row:last-child { border-bottom: none; }
.impact-row .top { display: flex; align-items: center; gap: 10px; }
.impact-row .top h5 { font-size: 14.5px; color: var(--ink); font-weight: 700; }
.impact-row .top a { margin-left: auto; font-size: 12.5px; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.impact-row .top a:hover { color: var(--orange); }
.impact-row .why { margin-top: 6px; font-size: 13px; color: var(--muted); }
.impact-row .why b { color: var(--ink-2); font-weight: 600; }

.risk-table-panel { margin-top: 16px; overflow-x: auto; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.filters .chip {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  font-size: 13px; padding: 6px 14px; border-radius: 999px; transition: all .2s;
}
.filters .chip.on { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.filters input {
  margin-left: auto; border: 1px solid var(--line); border-radius: var(--r-ctl);
  padding: 7px 14px; font: inherit; font-size: 13.5px; outline: none; width: 220px; color: var(--text);
}
.filters input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
table.risk { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.risk th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.risk td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--text); }
table.risk tr:last-child td { border-bottom: none; }
table.risk tr:hover td { background: #fafbfc; }
table.risk .t-title { font-weight: 600; color: var(--ink); }
table.risk a.ext { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
table.risk a.ext:hover { color: var(--orange); }
.empty-row td { text-align: center; color: var(--muted); padding: 32px 0; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .site-header .wrap {
    height: auto; flex-wrap: wrap; gap: 10px 12px;
    padding-top: 10px; padding-bottom: 8px;
  }
  .brand { flex: none; white-space: nowrap; }
  .industry-switcher { margin-left: auto; }
  .main-nav {
    order: 3; width: 100%; margin-left: 0; gap: 18px;
    overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a, .nav-cta { flex: none; white-space: nowrap; }
}
@media (max-width: 960px) {
  .band .wrap, .upd-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding-top: 48px; }
  .hero h1 { font-size: 36px; }
  .lib-grid { grid-template-columns: 1fr 1fr; }
  .lib-card.wide { grid-column: span 2; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .dash-grid, .dash-grid.trend-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .site-header { position: static; }
  .site-header .wrap {
    height: auto; flex-wrap: wrap; gap: 10px 12px;
    padding-top: 10px; padding-bottom: 8px;
  }
  .brand {
    flex: 1 1 0; min-width: 0; font-size: 14.5px; gap: 8px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .brand-logo { height: 26px; }
  .brand-name { flex: 1 1 auto; min-width: 0; padding-left: 9px; overflow: hidden; text-overflow: ellipsis; }
  .brand-mark { flex: none; width: 26px; height: 26px; font-size: 13px; }
  .main-nav {
    order: 3; width: 100%; margin-left: 0; gap: 14px;
    overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { flex: none; font-size: 13px; white-space: nowrap; }
  .main-nav a:not(.keep) { display: none; }
  .nav-cta { flex: none; font-size: 13px; padding: 6px 12px; white-space: nowrap; }
  .nav-buy { display: none; }
  .lib-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .lib-card.tall { grid-row: auto; }
  .lib-card.wide { grid-column: auto; }
  .kpis { grid-template-columns: 1fr; }
  .filters input { width: 100%; margin-left: 0; }
  .hero { padding: 40px 0; }
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 15px; }
  .agent-hero .agent-bar { flex-wrap: wrap; padding: 12px; }
  .agent-hero .agent-bar input { flex-basis: 100%; padding: 6px 10px; }
  .agent-hero .agent-bar button { flex: 1; }
  .hero-caps { gap: 12px 16px; }
  .hero-chips { justify-content: flex-start; }
  .hero-chips button { font-size: 12.5px; padding: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- secondary pages ---------- */
.crumb { padding: 18px 0 0; font-size: 13px; color: var(--muted); }
.crumb a { color: var(--blue); }
.crumb a:hover { color: var(--ink-2); }
.crumb .sep { margin: 0 8px; color: #b6c2cf; }
.crumb .cur { color: var(--ink); font-weight: 600; }
.lib-hero .page-head .num { color: var(--orange); font-weight: 700; }
.page-head { padding: 16px 0 22px; }
.page-head h1 { font-size: 26px; color: var(--ink); font-weight: 700; line-height: 1.4; }
.page-head .sub { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }

/* ---------- 行业页头标识 ---------- */
.industry-marker {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 5px; font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--ink-2);
}
.industry-marker::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--orange); }

.lib-hero { position: relative; }

body:not([data-industry]) .lib-hero,
body[data-industry="general"] .lib-hero { overflow: hidden; }
body:not([data-industry]) .lib-hero::before,
body[data-industry="general"] .lib-hero::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 58%;
  background-image: url("../images/hero-bg.webp");
  background-position: 72% center; background-size: cover; background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .4) 26%, #000 62%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .4) 26%, #000 62%);
  opacity: .85; pointer-events: none;
}
body:not([data-industry]) .lib-hero::after,
body[data-industry="general"] .lib-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(247, 248, 250, .96) 0%, rgba(247, 248, 250, .84) 36%, rgba(247, 248, 250, .25) 64%, rgba(247, 248, 250, 0) 86%);
}
body:not([data-industry]) .lib-hero > .wrap,
body[data-industry="general"] .lib-hero > .wrap { position: relative; z-index: 1; }

body[data-industry="international"] { --industry-hero: url("../images/industry/international-hero.webp"); }
body[data-industry="fund"] { --industry-hero: url("../images/industry/fund-hero.webp"); }
body[data-industry="construction"] { --industry-hero: url("../images/industry/construction-hero.webp"); }
body[data-industry="transport"] { --industry-hero: url("../images/industry/transport-hero.webp"); }
body[data-industry="coal"] { --industry-hero: url("../images/industry/coal-hero.webp"); }
body[data-industry="water"] { --industry-hero: url("../images/industry/water-hero.webp"); }
body[data-industry="telecom"] { --industry-hero: url("../images/industry/telecom-hero.webp"); }
body[data-industry="tobacco"] { --industry-hero: url("../images/industry/tobacco-hero.webp"); }
body[data-industry="metro"] { --industry-hero: url("../images/industry/metro-hero.webp"); }

body[data-industry]:not([data-industry="general"]) .lib-hero {
  overflow: hidden; background: #f7f9fc; border-bottom: 1px solid #e4ebf4;
}
body[data-industry]:not([data-industry="general"]) .lib-hero::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 62%;
  background-image: var(--industry-hero);
  background-position: 68% center; background-size: cover; background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .45) 22%, #000 58%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .45) 22%, #000 58%);
  opacity: .92; pointer-events: none;
}
body[data-industry]:not([data-industry="general"]) .lib-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(247, 249, 252, .96) 0%, rgba(247, 249, 252, .86) 34%, rgba(247, 249, 252, .3) 62%, rgba(247, 249, 252, 0) 84%);
}
body[data-industry]:not([data-industry="general"]) .lib-hero > .wrap { position: relative; z-index: 1; }
body[data-industry]:not([data-industry="general"]) .lib-hero + .wrap > .cat-l1,
body[data-industry]:not([data-industry="general"]) .lib-hero + .wrap > .law-feed-band,
body[data-industry]:not([data-industry="general"]) .lib-hero + .wrap > .list-toolbar,
body[data-industry]:not([data-industry="general"]) .lib-hero + .wrap > .case-note,
body[data-industry]:not([data-industry="general"]) .lib-hero + .wrap > .layout-2 { margin-top: 20px; }

@media (max-width: 720px) {
  .industry-marker { font-size: 11px; letter-spacing: .1em; }
  body[data-industry]:not([data-industry="general"]) .lib-hero::before {
    width: 100%; background-position: 72% center; opacity: .68;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .4) 0%, #000 46%, rgba(0, 0, 0, .45) 100%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .4) 0%, #000 46%, rgba(0, 0, 0, .45) 100%);
  }
  body[data-industry]:not([data-industry="general"]) .lib-hero::after {
    background: linear-gradient(180deg, rgba(247, 249, 252, .56) 0%, rgba(247, 249, 252, .74) 100%);
  }
}

.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; padding-bottom: 88px; align-items: start; }
.layout-2 > * { min-width: 0; }
.layout-2.side-left { grid-template-columns: 250px minmax(0, 1fr); }

.tree { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px; position: sticky; top: 80px; max-height: calc(100vh - 110px); overflow: auto; }
.tree h3 { font-size: 14px; color: var(--ink); font-weight: 700; padding: 6px 10px 10px; }
.tree button { display: flex; width: 100%; text-align: left; border: none; background: none; font: inherit; font-size: 13.5px; color: var(--muted); padding: 8px 10px; border-radius: 8px; transition: background .15s, color .15s; }
.tree button:hover { background: #f2f5f9; color: var(--ink); }
.tree button.on { background: var(--blue-tint); color: var(--ink-2); font-weight: 600; }
.tree button .c { margin-left: auto; font-size: 12px; color: #94a3b2; }
.tree button.scene { padding-left: 30px; font-size: 13px; position: relative; }
.tree button.scene::before { content: ""; position: absolute; left: 16px; top: 50%; width: 7px; height: 1px; background: #cfd9e6; }

.cat-l1 { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.cat-l1 button {
  display: inline-flex; align-items: baseline; gap: 7px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500;
  padding: 8px 18px; border-radius: 999px; transition: all .18s;
}
.cat-l1 button .c { font-size: 12px; color: #94a3b2; }
.cat-l1 button:hover { border-color: var(--blue); color: var(--ink-2); }
.cat-l1 button.on { background: linear-gradient(135deg, #2f74e0, #1d55ae); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 5px 12px -5px rgba(45, 108, 223, .55); }
.cat-l1 button.on .c { color: rgba(255, 255, 255, .78); }

/* 行业库：L1 按职能管理 / 业务管理分组 */
.cat-l1.cat-groups {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 10px 22px 18px; margin-bottom: 20px;
}
.cat-l1.cat-groups .cat-l1-head { display: flex; justify-content: flex-end; margin-bottom: 2px; }
.cat-l1.cat-groups .cat-l1-head .l1-all { font-size: 12.5px; padding: 5px 14px; color: var(--muted); }
.cat-l1.cat-groups .cat-l1-head .l1-all.on { color: #fff; }
.cat-l1.cat-groups .cat-group { padding: 6px 0 4px; }
.cat-l1.cat-groups .cat-group + .cat-group { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 18px; }
.cat-l1.cat-groups .cat-group h3 {
  font-size: 17px; font-weight: 700; color: var(--ink);
  padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.cat-l1.cat-groups .cat-group-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px;
}
.cat-l1.cat-groups .cat-group-grid button {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
  text-align: center; background: #f2f4f7;
  border: 1px solid transparent; border-radius: 10px; padding: 14px 12px;
  font-size: 15px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden;
}
.cat-l1.cat-groups .cat-group-grid button .l1-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cat-l1.cat-groups .cat-group-grid button .c { flex: none; font-variant-numeric: tabular-nums; }
.cat-l1.cat-groups .cat-group-grid button:hover { background: var(--blue-tint); border-color: transparent; color: var(--ink-2); }
.cat-l1.cat-groups .cat-group-grid button.on { background: linear-gradient(135deg, #2f74e0, #1d55ae); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 5px 12px -5px rgba(45, 108, 223, .55); }
.cat-l1.cat-groups .cat-group-grid button.on .c { color: rgba(255, 255, 255, .78); }

.tree button.scene2 { padding-left: 44px; font-size: 12.5px; }
.tree button.scene2::before { left: 30px; }
.tree button.l2h { font-weight: 600; color: var(--ink); }
.tree button .l2-name { flex: 1; min-width: 0; padding-right: 8px; }
.tree button .c { flex: none; }
.tree button.l1h { font-weight: 700; color: var(--ink); margin-top: 4px; }
.tree button.case-l1 .l1-name { flex: 1; min-width: 0; padding-right: 8px; }
.tree button.case-l1 .chev { flex: none; margin-left: 6px; font-size: 16px; line-height: 1; color: #94a3b2; transition: transform .15s; }
.tree button.case-l1.open .chev { transform: rotate(90deg); }
.tree button.risk-l2.nested { padding-left: 26px; font-weight: 500; color: var(--muted); }
.tree button.risk-l2.nested.on { font-weight: 600; color: var(--ink); }
.tree button.all-cat { font-weight: 700; color: var(--ink-2); margin-bottom: 6px; border-bottom: 1px solid var(--line); padding-bottom: 10px; border-radius: 8px 8px 0 0; }
.tree button.all-cat.on { background: var(--blue-tint); }

.badge.ok { color: #1f7a44; background: #e7f6ec; }
.badge.wait { color: #a05a00; background: var(--orange-tint); }

.list-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.list-toolbar .count { font-size: 13px; color: var(--muted); margin-right: auto; }
.list-toolbar input { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 7px 14px; font: inherit; font-size: 13.5px; outline: none; width: 220px; color: var(--text); }
.list-toolbar input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.list-toolbar .law-cat-filter { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
/* display:flex 会盖掉 hidden 属性，不补这条「国家/地区」框会一直显示成空下拉 */
.list-toolbar .law-cat-filter[hidden] { display: none; }
.law-cat-filter select { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 7px 10px; font: inherit; font-size: 13.5px; color: var(--text); background: #fff; outline: none; max-width: 200px; }
.law-cat-filter select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.level-chips { display: flex; gap: 6px; }
.list-toolbar .chip { border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 13px; padding: 6px 14px; border-radius: 999px; transition: all .2s; }
.list-toolbar .chip:hover { border-color: var(--blue); color: var(--ink-2); }
.list-toolbar .chip.on { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.list-toolbar .empty { text-align: center; padding: 48px 20px; color: var(--muted); font-size: 14px; }

.row-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; margin-bottom: 12px; display: block; transition: transform .2s, box-shadow .2s, border-color .2s; }
.row-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #cfd9e6; }
.row-card .top { display: flex; align-items: center; gap: 10px; }
.row-card .top .badge { flex: none; white-space: nowrap; }
.row-card h3 { font-size: 16px; color: var(--ink); font-weight: 700; }
.row-card .snip { margin-top: 8px; font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-card .foot { margin-top: 10px; display: flex; gap: 14px; align-items: center; font-size: 12.5px; color: var(--muted); }
.row-card .case-no { font-weight: 600; color: #5b6472; font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* Position & Process card specific styles */
.position-card .badge.dept,
.process-card .badge.type { background: var(--blue-tint); color: var(--ink-2); }
.position-card .badge.level,
.process-card .badge.steps { background: var(--orange-tint); color: #a05a00; }
.risk-links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.risk-tag { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--red-tint); color: var(--red); font-weight: 500; }

/* Detail page styles */
.doc-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 2px solid var(--line); }
.doc-header .badges { display: flex; gap: 10px; margin-bottom: 12px; }
.doc-header h1 { font-size: 26px; color: var(--ink); font-weight: 700; line-height: 1.3; }
.doc section { margin-bottom: 28px; }
.doc section h2 { font-size: 18px; color: var(--ink); font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.section-desc { font-size: 14px; color: var(--muted); margin-bottom: 14px; }

/* Risk links in detail pages */
.risk-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.risk-link { display: inline-block; padding: 8px 16px; background: var(--red-tint); color: var(--red); border-radius: 8px; font-size: 13.5px; font-weight: 500; transition: all .2s; text-decoration: none; }
.risk-link:hover { background: var(--red); color: #fff; transform: translateY(-1px); }

/* Related laws / cases lists in detail pages */
.rel-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.rel-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.rel-item:hover { border-color: #cfd9e6; box-shadow: 0 4px 14px rgba(30, 58, 95, .08); }
.rel-item .badge { flex: none; white-space: nowrap; }
.rel-title { font-size: 14px; color: var(--ink); font-weight: 600; line-height: 1.5; }
.rel-item:hover .rel-title { color: var(--ink-2); }
.rel-meta { margin-left: auto; font-size: 12px; color: var(--muted); background: #eef1f5; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.side-more { font-size: 12.5px; color: var(--muted); padding-top: 6px; }

/* Steps container */
.steps-container { margin-top: 16px; }
.step-item { display: flex; gap: 16px; margin-bottom: 16px; padding: 16px; background: var(--bg); border-radius: 10px; border-left: 4px solid var(--blue); }
.step-num { flex-shrink: 0; width: 36px; height: 36px; background: var(--blue); color: #fff; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.step-content h4 { font-size: 15px; color: var(--ink); font-weight: 600; margin-bottom: 6px; }
.step-content p { font-size: 13.5px; color: var(--text); line-height: 1.7; }

/* Requirements list */
.requirements { list-style: none; padding: 0; }
.requirements li { position: relative; padding-left: 28px; margin-bottom: 12px; font-size: 14px; color: var(--text); line-height: 1.7; }
.requirements li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #22a06b; font-weight: 700; font-size: 16px; }

/* Position/Process examples */
.position-examples,
.process-examples { margin-top: 12px; }
.proc-link { display: inline-block; color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: none; transition: color .2s; }
.proc-link:hover { color: var(--orange); }

/* Flowchart styles */
.flowchart-container {
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
}
.flowchart-container:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 12px rgba(45, 108, 223, .15);
}
.flowchart-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}
.flowchart-hint {
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* Flowchart modal */
.flowchart-modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 42, 71, .9);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.flowchart-modal-content {
  background: #fff;
  border-radius: 16px;
  width: 90vw;
  height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
  overflow: hidden;
}
.flowchart-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}
.flowchart-modal-header h3 {
  font-size: 18px;
  color: var(--ink);
  font-weight: 700;
  margin: 0;
}
.flowchart-modal-header .close-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg);
  border-radius: 8px;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
  display: grid;
  place-items: center;
}
.flowchart-modal-header .close-btn:hover {
  background: var(--red-tint);
  color: var(--red);
}
.flowchart-modal-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flowchart-drag-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.flowchart-draggable-img {
  max-width: none;
  max-height: none;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform .15s ease-out;
  transform-origin: center center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
}
.drag-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 42, 71, .8);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  pointer-events: none;
  opacity: .9;
}

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 22px; }
.pager button { min-width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font-size: 13px; color: var(--muted); transition: all .15s; }
.pager button:hover { border-color: var(--blue); color: var(--ink-2); }
.pager button.on { background: linear-gradient(135deg, #2f74e0, #1d55ae); border-color: transparent; color: #fff; box-shadow: 0 4px 10px -4px rgba(45, 108, 223, .55); }

.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 26px 30px; }
.doc section + section { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.doc h2 { font-size: 17px; color: var(--ink); font-weight: 700; margin-bottom: 12px; }
.doc p { font-size: 14.5px; color: var(--text); }
.doc ol, .doc ul { padding-left: 20px; font-size: 14.5px; color: var(--text); }
.doc li + li { margin-top: 8px; }
.meta-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 18px; }
.meta-grid .cell { background: #fbfcfd; padding: 12px 16px; }
.meta-grid .k { font-size: 12px; color: var(--muted); }
.meta-grid .v { margin-top: 4px; font-size: 14px; color: var(--ink); font-weight: 600; }

/* Risk detail page: document + right rail */
.rdx-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.rdx-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.rdx-hero { padding: 28px 32px 24px; border-bottom: 1px solid var(--line); }
.rdx-eyebrow { font-size: 12.5px; font-weight: 700; color: var(--blue); letter-spacing: .08em; }
.rdx-title { margin-top: 8px; font-size: 26px; line-height: 1.45; color: var(--ink); font-weight: 700; }
.rdx-meta { margin-top: 20px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.rdx-meta .cell { padding: 11px 14px; }
.rdx-meta .k { font-size: 12px; }
.rdx-meta .v { font-size: 13.5px; line-height: 1.5; }
.rdx-section { padding: 24px 32px; }
.rdx-section + .rdx-section { border-top: 1px solid var(--line); }
.rdx-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rdx-sec-head h2 { font-size: 16.5px; font-weight: 700; color: var(--ink); letter-spacing: .01em; }
.rdx-sec-head .n { font-size: 12.5px; color: var(--muted); }
.rdx-sec-body { font-size: 14.5px; color: var(--text); line-height: 1.9; }
.rdx-sec-body p { white-space: pre-line; }
.rdx-ob + .rdx-ob { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.rdx-ob-h { display: flex; align-items: baseline; gap: 10px; }
.rdx-ob-no, .rdx-law-no {
  flex: none; width: 22px; height: 22px; border-radius: 6px;
  background: var(--blue-tint); color: var(--ink-2);
  font-size: 12px; font-weight: 700; display: grid; place-items: center;
  transform: translateY(4px);
}
.rdx-ob-h h3 { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.65; }
.rdx-ob p { margin-top: 6px; padding-left: 32px; font-size: 14px; line-height: 1.8; white-space: pre-line; }
.rdx-ob-text { font-size: 14px; line-height: 1.85; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.rdx-laws { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.rdx-laws li { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.rdx-law-body { flex: 1; min-width: 0; }
.rdx-laws a { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.6; }
.rdx-laws a:hover { color: var(--orange); }
.rdx-law-meta { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.rdx-case-list { display: flex; flex-direction: column; gap: 8px; }
.rdx-case { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: border-color .18s, box-shadow .18s; }
.rdx-case:hover { border-color: #cfd9e6; box-shadow: 0 4px 14px rgba(30, 58, 95, .08); }
.rdx-case .rel-title { flex: 1; min-width: 0; }
.rdx-case:hover .rel-title { color: var(--orange); }
.case-risk-desc { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 400; color: var(--muted); line-height: 1.65; }
.rdx-empty { color: var(--muted); font-size: 14px; }
.rdx-state { padding: 64px 24px; text-align: center; color: var(--muted); font-size: 14px; }
.rdx-state a { color: var(--ink-2); font-weight: 600; }
.rdx-footer { padding: 20px 32px 26px; border-top: 1px solid var(--line); }
.rdx-back-row { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.rdx-footer .risk-pager { padding: 0; }
.rdx-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 88px; }
.rdx-side[hidden] { display: none; }
.rdx-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; }
.rdx-card h3 { font-size: 14.5px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.rdx-related { display: flex; flex-direction: column; }
.rdx-related a { display: block; padding: 10px 8px; margin: 0 -8px; border-radius: 8px; border-bottom: 1px solid var(--line); }
.rdx-related a:last-child { border-bottom: none; }
.rdx-related a:hover { background: #f7f9fc; }
.rdx-related .t { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.55; }
.rdx-related .m { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.rdx-ask { background: linear-gradient(180deg, #fff8f1 0%, #fff 100%); border-color: #f3ddc9; }
.rdx-ask p { font-size: 13px; color: var(--muted); line-height: 1.75; margin-bottom: 12px; }
.rdx-ask-btn { display: inline-flex; align-items: center; gap: 4px; padding: 8px 16px; border-radius: 8px; background: var(--orange); color: #fff; font-size: 13px; font-weight: 600; }
.rdx-ask-btn:hover { color: #fff; filter: brightness(.95); }
.rdx-stats > div { display: flex; align-items: baseline; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.rdx-stats > div:last-child { border-bottom: none; }
.rdx-stats dt { font-size: 12.5px; color: var(--muted); }
.rdx-stats dd { font-size: 15px; font-weight: 700; color: var(--ink); }
.rdx-stats dd em { margin-left: 2px; font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.btn-back {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 16px; border: 1px solid #b9cdf0; border-radius: 999px;
  background: var(--surface); color: var(--blue); font-size: 13.5px; font-weight: 600;
  transition: background .15s, border-color .15s;
}
.btn-back:hover { background: var(--blue-tint); border-color: var(--blue); }
.risk-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 14px 24px 24px; }
.pager-card {
  display: block; padding: 15px 18px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pager-card:hover { border-color: #cfd9e6; box-shadow: 0 4px 14px rgba(30, 58, 95, .08); transform: translateY(-1px); }
.pager-card .dir { font-size: 12.5px; color: var(--blue); }
.pager-card strong { display: block; margin-top: 6px; font-size: 14.5px; color: var(--ink); font-weight: 600; line-height: 1.5; }
.pager-card.next { text-align: right; }
.pager-card.disabled { background: #fafbfc; cursor: default; transform: none; box-shadow: none; }
.pager-card.disabled .dir, .pager-card.disabled strong { color: var(--muted); font-weight: 500; }

/* Risk library: list only */
.layout-2.side-left.layout-risk { grid-template-columns: 228px minmax(0, 1fr); }

/* Risk detail: keep the library classification shell */
body.risk-shell .wrap { max-width: 1320px; }
body.risk-shell .page-head { padding-bottom: 18px; }
body.risk-shell .cat-l1 { margin-bottom: 16px; }

body.risk-shell .layout-2.side-left.layout-risk { grid-template-columns: 248px minmax(0, 1fr); }
body.risk-shell .tree { top: 84px; max-height: calc(100vh - 130px); }

@media (max-width: 1200px) {
  body.risk-shell .rdx-layout { grid-template-columns: minmax(0, 1fr); }
  body.risk-shell .rdx-side { position: static; }
}

@media (max-width: 960px) {
  body.risk-shell .layout-2.side-left.layout-risk { grid-template-columns: 1fr; }
  body.risk-shell #detail-layout > aside { display: none; }
}

@media (max-width: 640px) {
  .list-toolbar .law-cat-filter { flex: 1 1 100%; }
  .law-cat-filter select { flex: 1; max-width: none; }
  .list-toolbar input { width: 100%; }
  body.risk-shell .wrap { padding: 0 16px; }
  body.risk-shell .page-head h1 { font-size: 22px; }
  body.risk-shell .cat-l1 { gap: 6px; }
  body.risk-shell .cat-l1 button { padding: 7px 14px; font-size: 13px; }
  body.risk-shell .cat-l1.cat-groups .cat-group-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1100px) {
  .rdx-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; }
  .rdx-hero { padding: 24px 26px 20px; }
  .rdx-section { padding: 22px 26px; }
  .rdx-footer { padding: 18px 26px 24px; }
}

@media (max-width: 960px) {
  .rdx-layout { grid-template-columns: 1fr; }
  .rdx-side { position: static; }
}

@media (max-width: 640px) {
  .rdx-hero { padding: 20px 18px 18px; }
  .rdx-title { font-size: 21px; }
  .rdx-section { padding: 18px 18px; }
  .rdx-footer { padding: 16px 18px 20px; }
  .rdx-laws li, .rdx-case { padding: 10px 12px; }
}

.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; margin-bottom: 16px; }
.side-card h3 { font-size: 14.5px; color: var(--ink); font-weight: 700; margin-bottom: 10px; }
.side-link { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--text); }
.side-link:last-child { border-bottom: none; }
.side-link:hover { color: var(--ink-2); }
.side-link .why { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }

.basis-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.basis-item:last-child { border-bottom: none; }
.basis-item .no { flex: none; width: 22px; height: 22px; border-radius: 6px; background: var(--blue-tint); color: var(--ink-2); font-size: 12px; font-weight: 700; display: grid; place-items: center; transform: translateY(4px); }
.basis-item a { color: var(--ink-2); font-weight: 600; }
.basis-item a:hover { color: var(--orange); }

.article { padding: 14px 0; border-bottom: 1px solid var(--line); }
.article:last-child { border-bottom: none; }
.article .no { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.article p { margin-top: 6px; font-size: 14.5px; }

@media (max-width: 960px) {
  .layout-2, .layout-2.side-left,
  .layout-2.side-left.layout-risk { grid-template-columns: 1fr; }
  .tree { position: static; }
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .doc { padding: 20px; }
  .risk-pager { grid-template-columns: 1fr; padding: 12px 18px 20px; }
}

/* ---------- law library: kind bar (效力层级) ---------- */
.kind-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.kind-bar button {
  display: inline-flex; align-items: baseline; gap: 7px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500;
  padding: 8px 18px; border-radius: 999px; transition: all .18s;
}
.kind-bar button .c { font-size: 12px; color: #94a3b2; }
.kind-bar button:hover { border-color: var(--blue); color: var(--ink-2); }
.kind-bar button.on { background: var(--ink-2); border-color: var(--ink-2); color: #fff; font-weight: 600; }
.kind-bar button.on .c { color: rgba(255, 255, 255, .7); }
.kind-bar button.zero { opacity: .55; }

/* ---------- sidebar filters (效力层级 / 业务领域) ---------- */
.side-filter { margin-top: 12px; }
.side-filter h3 { font-size: 13px; color: var(--muted); font-weight: 600; padding: 0 10px 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.side-filter button { display: flex; width: 100%; text-align: left; border: none; background: none; font: inherit; font-size: 13.5px; color: var(--muted); padding: 8px 10px; border-radius: 8px; transition: background .15s, color .15s; }
.side-filter button:hover { background: #f2f5f9; color: var(--ink); }
.side-filter button.on { background: var(--blue-tint); color: var(--ink-2); font-weight: 600; }
.side-filter button .c { margin-left: auto; font-size: 12px; color: #94a3b2; }
.side-filter button.zero { opacity: .55; }

@media (max-width: 960px) {
  #dept-filter {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin: 0 0 16px; padding: 14px 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  }
  #dept-filter h3 { width: 100%; padding: 0 0 2px; }
  #dept-filter button {
    display: inline-flex; width: auto; align-items: center; gap: 6px;
    padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
    background: var(--surface); color: var(--text);
  }
  #dept-filter button .c { margin-left: 0; }
  #dept-filter button.on { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
  #dept-filter button.on .c { color: rgba(255, 255, 255, .72); }
  #dept-filter .side-loading { width: 100%; }
}

/* ---------- law library: new-law impact band ---------- */
.law-feed-band { margin: 4px 0 22px; }
.lf-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.lf-head h2 { font-size: 16px; color: var(--ink); font-weight: 700; }
.lf-head a { margin-left: auto; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.lf-head a:hover { color: var(--orange); }
.lf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lf-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.lf-card:hover { border-color: #cfd9e6; box-shadow: var(--shadow); }
.lf-top { display: flex; align-items: center; gap: 8px; }
.lf-top .badge { flex: none; white-space: nowrap; }
.lf-top h3 { font-size: 14.5px; color: var(--ink); font-weight: 700; line-height: 1.4; }
.lf-top h3 a { color: var(--ink); }
.lf-top h3 a:hover { color: var(--ink-2); }
.lf-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.lf-impact { margin-top: auto; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.lf-impact b { color: var(--orange); font-size: 15px; }
.lf-impact:hover { color: var(--orange); }
.lf-none { margin-top: auto; font-size: 12.5px; color: #94a3b2; }

/* ---------- law detail ---------- */
.law-fulltext summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
.law-fulltext summary:hover { color: var(--orange); }
.law-content {
  font-size: 14.5px; line-height: 1.95; color: var(--text);
  max-height: 640px; overflow: auto; padding: 24px 28px; margin-top: 10px;
  background: #fbfcfd; border: 1px solid var(--line); border-radius: 10px;
  text-align: justify; text-justify: inter-ideograph;
}
.law-content-note {
  font-size: 12px; color: #8a95a5; margin: 0 0 16px; padding-bottom: 10px;
  border-bottom: 1px dashed var(--line); text-align: left;
}
.law-body { max-width: 760px; margin: 0 auto; }
.law-block { margin: 0; }
.law-block.p { text-indent: 2em; margin: 0 0 8px; }
.law-block.law-article { text-indent: 2em; margin: 0 0 8px; }
.law-block.law-article .law-no { font-weight: 700; color: var(--ink); margin-right: .35em; }
.law-block.item { padding-left: 2em; margin: 0 0 4px; }
.law-block.docpart {
  font-size: 16px; font-weight: 700; color: var(--ink);
  margin: 34px 0 14px; padding-bottom: 8px; line-height: 1.6;
  border-bottom: 1px solid var(--line); text-indent: 0; text-align: left;
}
.law-block.docpart:first-child { margin-top: 0; }
.law-block.chapter {
  text-align: center; font-size: 17px; font-weight: 700; color: var(--ink);
  margin: 28px 0 12px; line-height: 1.6; letter-spacing: .04em; text-indent: 0;
}
.law-block.chapter:first-child { margin-top: 0; }
.law-block.section {
  text-align: center; font-size: 15px; font-weight: 600; color: var(--ink);
  margin: 20px 0 10px; line-height: 1.6; text-indent: 0;
}
.law-block.pubinfo {
  text-align: center; font-size: 13px; color: var(--muted);
  margin: 2px 0 16px; text-indent: 0;
}
.law-preamble {
  margin: 0 0 18px; padding: 12px 16px; background: #f4f7fb;
  border: 1px dashed #d8e2ee; border-radius: 8px; text-align: left;
}
.law-preamble summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.law-preamble summary:hover { color: var(--ink-2); }
.law-preamble .law-block {
  text-indent: 0; font-size: 12.5px; line-height: 1.8; color: var(--ink-2);
  margin: 6px 0; padding-left: 0;
}
.law-preamble .law-block.chapter,
.law-preamble .law-block.section {
  text-align: left; font-size: 13px; font-weight: 600; margin: 8px 0 4px;
}
.law-table-wrap {
  overflow-x: auto; margin: 14px 0; border: 1px solid var(--line);
  border-radius: 8px; background: #fff;
}
.law-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.65; }
.law-table td { border: 1px solid var(--line); padding: 7px 10px; vertical-align: top; text-align: left; }
.law-table tr:first-child td { background: #f7f9fc; font-weight: 600; white-space: nowrap; }
.impact-stats { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13.5px; color: var(--muted); }
.impact-stats b { color: var(--ink); font-size: 18px; margin-left: 2px; }
.impact-stats b.red { color: var(--red); }
.impact-stats b.orange { color: #a05a00; }
.impact-row .top a.impact-risk-link { margin-left: 0; white-space: normal; }
.impact-row .top a.impact-risk-link h5 { color: var(--ink); }
.impact-row .top a.impact-risk-link:hover h5 { color: var(--orange); }
.list-more { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.empty-inline { font-size: 13.5px; color: var(--muted); padding: 16px 0; }
.side-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); line-height: 2; }
.side-kv b { color: var(--ink); font-weight: 600; text-align: right; }

/* ---------- case library note ---------- */
.case-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--blue-tint); border: 1px solid #d5e3f8; border-radius: var(--r-ctl);
  padding: 12px 16px; margin: 0 0 22px; font-size: 13px; color: var(--ink-2); line-height: 1.6;
}
.case-note .cn-ico { flex: none; color: var(--blue); transform: translateY(2px); }

/* ---------- login modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(14, 42, 71, .45);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.on { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: 0 20px 60px rgba(14, 42, 71, .18);
  width: 100%; max-width: 400px;
  padding: 32px 28px 28px;
  transform: translateY(12px);
  transition: transform .2s;
}
.modal-overlay.on .modal-box { transform: translateY(0); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-head h2 { font-size: 20px; color: var(--ink); font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: transparent;
  color: var(--muted); font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--bg); color: var(--ink); }
.modal-body { display: flex; flex-direction: column; gap: 16px; }
.modal-body label { font-size: 13.5px; color: var(--text); font-weight: 600; display: block; margin-bottom: 6px; }
.modal-body input {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-ctl);
  padding: 10px 14px; font: inherit; font-size: 14.5px; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.modal-body input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.modal-body input::placeholder { color: #94a3b2; }
.modal-error { font-size: 13px; color: var(--red); min-height: 18px; }
.modal-submit {
  width: 100%; border: none; border-radius: var(--r-ctl);
  background: var(--ink-2); color: #fff;
  padding: 12px; font: inherit; font-size: 15px; font-weight: 600;
  transition: background .15s, transform .1s;
}
.modal-submit:hover { background: var(--ink); }
.modal-submit:active { transform: scale(.98); }
.modal-submit:disabled { opacity: .5; cursor: not-allowed; }
.modal-foot { margin-top: 20px; text-align: center; font-size: 13px; color: var(--muted); }
.modal-foot a { color: var(--blue); font-weight: 600; }
.modal-foot a:hover { color: var(--ink-2); }

/* modal tabs */
.modal-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.modal-tabs .tab {
  flex: 1; border: none; background: transparent;
  padding: 10px 0; font: inherit; font-size: 14.5px; font-weight: 600;
  color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.modal-tabs .tab:hover { color: var(--ink-2); }
.modal-tabs .tab.on { color: var(--ink-2); border-bottom-color: var(--ink-2); }

/* input with button (verification code) */
.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row input { flex: 1; min-width: 0; }
.code-btn {
  flex: none; border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--bg); color: var(--muted);
  padding: 0 14px; font: inherit; font-size: 13px; font-weight: 600;
  white-space: nowrap; cursor: pointer;
  transition: all .15s;
}
.code-btn:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.code-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- purchase modal ---------- */
.modal-wide { max-width: 720px; padding: 32px 32px 24px; }
.purchase-body { display: flex; gap: 24px; }
.purchase-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; flex: 1; }
.plan-card {
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 20px 18px; display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); transition: border-color .2s, box-shadow .2s;
}
.plan-card:hover { border-color: #cfd9e6; box-shadow: var(--shadow); }
.plan-card.featured { border-color: var(--blue); background: var(--blue-tint); }
.plan-tag { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.plan-card.featured .plan-tag { color: var(--blue); }
.plan-price { font-size: 28px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.plan-price span { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; }
.plan-features li { font-size: 13.5px; color: var(--text); line-height: 1.5; padding-left: 18px; position: relative; }
.plan-features li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  color: var(--blue); font-weight: 700; font-size: 13px;
}
.plan-btn {
  margin-top: auto; border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--ink-2);
  padding: 10px; font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.plan-btn:hover { border-color: var(--blue); color: var(--blue); }
.plan-btn.primary { background: var(--ink-2); color: #fff; border-color: var(--ink-2); }
.plan-btn.primary:hover { background: var(--ink); border-color: var(--ink); }

.purchase-qr { flex: none; width: 220px; display: flex; align-items: center; justify-content: center; }
.qr-box { text-align: center; }
.qr-placeholder {
  width: 180px; height: 180px; border: 2px dashed var(--line); border-radius: var(--r-card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg); margin: 0 auto 12px;
}
.qr-icon { font-size: 48px; }
.qr-placeholder div:last-child { font-size: 13px; color: var(--muted); }
.qr-tip { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

.purchase-foot { margin-top: 20px; text-align: center; font-size: 13px; color: var(--muted); }
.purchase-foot a { color: var(--blue); font-weight: 600; margin-left: 6px; }
.purchase-foot a:hover { color: var(--ink-2); }

/* ---------- nav user state (logged in) ---------- */
.nav-user {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-tint); border: 1px solid #d5e3f8;
  border-radius: 10px; padding: 4px 5px 4px 12px;
  font-size: 13px; line-height: 1.25;
}
.nav-user-info { display: flex; flex-direction: column; min-width: 0; }
.nav-user-name { font-weight: 600; color: var(--ink-2); font-size: 13.5px; white-space: nowrap; }
.nav-user-expiry { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.nav-user.expired { background: var(--red-tint); border-color: #f5c6cb; }
.nav-user.expired .nav-user-name { color: var(--red); }
.nav-user.expired .nav-user-expiry { color: var(--red); }
.nav-logout {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: none; background: transparent;
  color: var(--muted); font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s;
}
.nav-logout:hover { background: rgba(0,0,0,.06); color: var(--ink); }

/* purchase button in nav */
.nav-buy {
  width: 36px; height: 36px; padding: 0;
  background: var(--orange); color: #fff; border: none; border-radius: var(--r-ctl);
}
.nav-buy svg { width: 18px; height: 18px; display: block; }
.nav-buy:hover { background: #e07d00; }
.nav-buy:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }

/* industry switcher */
.industry-switcher { position: relative; display: inline-block; }
.industry-btn {
  background: var(--blue-tint); color: var(--ink-2);
  border: 1px solid #d5e3f8; border-radius: var(--r-ctl);
  padding: 6px 14px; font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.industry-btn:hover { background: #d5e3f8; }
.industry-btn::after { content: '▾'; font-size: 11px; }
.industry-dropdown {
  position: absolute; top: calc(100% + 6px); left: auto; right: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-ctl); box-shadow: var(--shadow);
  min-width: 180px; padding: 6px 0;
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: all .15s; z-index: 50;
}
.industry-switcher.on .industry-dropdown {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.industry-dropdown button {
  display: block; width: 100%; border: none; background: transparent;
  padding: 9px 16px; font: inherit; font-size: 13.5px; color: var(--text);
  text-align: left; cursor: pointer; transition: background .1s;
}
.industry-dropdown button:hover { background: var(--bg); }
.industry-dropdown button.on { background: var(--blue-tint); color: var(--ink-2); font-weight: 600; }
.industry-dropdown .divider { height: 1px; background: var(--line); margin: 4px 0; }

@media (max-width: 960px) {
  .lf-grid { grid-template-columns: 1fr; }
}

/* ---------- process detail ---------- */
.process-header-section { margin-bottom: 32px; }
.process-header { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.process-header h1 { font-size: 24px; font-weight: 700; color: var(--ink); margin: 0 0 8px 0; }
.process-no { font-size: 14px; color: var(--muted); }

.flowchart-section { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.section-title { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 20px 0; }
.flowchart-large { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 16px; text-align: center; min-height: 400px; cursor: pointer; transition: all .2s; }
.flowchart-large:hover { border-color: var(--blue); box-shadow: 0 4px 12px rgba(59,130,246,.1); }
.flowchart-scroll { width: 100%; max-height: 68vh; overflow: auto; display: flex; align-items: flex-start; justify-content: center; }
.flowchart-large img { width: 100%; max-width: 100%; height: auto; object-fit: contain; border-radius: 4px; }
.flowchart-hint { position: absolute; bottom: 16px; right: 16px; background: rgba(0,0,0,.6); color: #fff; padding: 6px 12px; border-radius: 6px; font-size: 12px; }

.risks-section { margin-bottom: 32px; }
.risk-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.risk-card-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; cursor: pointer; transition: all .2s; }
.risk-card-item:hover { border-color: var(--blue); box-shadow: 0 4px 16px rgba(59,130,246,.15); transform: translateY(-2px); }
.risk-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.risk-card-title { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0; flex: 1; line-height: 1.4; }
.risk-card-body { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.risk-card-field { font-size: 13px; line-height: 1.5; }
.risk-card-field .field-label { color: var(--muted); font-weight: 600; }
.risk-card-field .field-value { color: var(--text); }
.risk-card-footer { padding-top: 12px; border-top: 1px solid var(--line); }
.view-detail { color: var(--blue); font-size: 13px; font-weight: 600; }

.process-nav-section { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 40px 0; }
.nav-btn { padding: 10px 20px; border: 1px solid var(--line); background: #fff; border-radius: 6px; font-size: 14px; color: var(--ink-2); cursor: pointer; transition: all .2s; }
.nav-btn:hover:not(:disabled) { background: var(--bg); border-color: var(--blue); color: var(--blue); }
.nav-btn:disabled { opacity: .4; cursor: not-allowed; }
.back-btn { display: inline-block; padding: 10px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--ink-2); font-size: 14px; text-decoration: none; transition: all .2s; margin-left: auto; }
.back-btn:hover { background: var(--bg); border-color: var(--blue); color: var(--blue); }

/* Risk modal */
.risk-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 10000; padding: 20px; }
.risk-modal-content { background: #fff; border-radius: 12px; max-width: 700px; width: 100%; max-height: 90vh; overflow-y: auto; }
.risk-modal-header { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 2px solid var(--line); position: relative; }
.risk-modal-header h2 { font-size: 20px; font-weight: 700; color: var(--ink); margin: 0; flex: 1; }
.risk-modal-header .close-btn { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 28px; color: var(--muted); cursor: pointer; line-height: 1; padding: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: all .2s; }
.risk-modal-header .close-btn:hover { background: var(--bg); color: var(--ink); }
.risk-modal-body { padding: 24px; }
.modal-field { margin-bottom: 20px; }
.modal-field:last-child { margin-bottom: 0; }
.modal-label { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.modal-value { font-size: 14px; color: var(--text); line-height: 1.7; }

/* Flowchart modal */
.flowchart-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.8); display: flex; align-items: center; justify-content: center; z-index: 10001; padding: 20px; }
.flowchart-modal-content { background: #fff; border-radius: 12px; max-width: 90vw; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; }
.flowchart-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.flowchart-modal-header h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0; }
.flowchart-modal-header .close-btn { background: none; border: none; font-size: 28px; color: var(--muted); cursor: pointer; line-height: 1; padding: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: all .2s; }
.flowchart-modal-header .close-btn:hover { background: var(--bg); color: var(--ink); }
.flowchart-modal-body { flex: 1; overflow: auto; padding: 20px; position: relative; min-height: 500px; display: flex; align-items: center; justify-content: center; }
.flowchart-drag-wrapper { overflow: visible; }
.flowchart-draggable-img { max-width: 100%; height: auto; cursor: grab; user-select: none; transition: transform .1s; }
.drag-hint { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.6); color: #fff; padding: 6px 12px; border-radius: 6px; font-size: 12px; }

.badge.high { background: #fde8e8; color: #c53030; }
.badge.mid { background: #fef3cd; color: #b7791f; }
.badge.low { background: #e7f6ec; color: #1f7a44; }

@media (max-width: 768px) {
  .risk-cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .law-content { padding: 16px 14px; font-size: 14px; line-height: 1.9; max-height: 70vh; }
  .law-block.docpart { font-size: 15px; margin: 26px 0 10px; }
  .law-block.chapter { font-size: 16px; margin: 22px 0 10px; }
  .law-block.section { font-size: 14.5px; margin: 16px 0 8px; }
  .law-block.p, .law-block.law-article { text-indent: 2em; }
  .law-block.item { padding-left: 1em; }
  .law-table { font-size: 12.5px; min-width: 560px; }
  .law-table td { padding: 6px 8px; }
  .law-preamble { padding: 10px 12px; }
}

/* ---------- related case modal (risk detail) ---------- */
.case-modal-overlay { z-index: 120; padding: 24px; }
.case-modal-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: 0 24px 80px rgba(14, 42, 71, .24);
  overflow: hidden;
  transform: translateY(12px);
  transition: transform .2s;
}
.modal-overlay.on .case-modal-box { transform: translateY(0); }
.case-modal-close {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .92);
  color: var(--muted); font-size: 22px; line-height: 1;
  transition: background .15s, color .15s, border-color .15s;
}
.case-modal-close:hover { background: var(--bg); color: var(--ink); border-color: #cfd9e6; }
.case-modal-body { overflow-y: auto; overscroll-behavior: contain; }
.case-modal-hero { padding-right: 68px; }
.case-modal-box .rdx-title { font-size: 24px; }
.case-modal-box .rdx-meta { margin-top: 18px; }
.case-modal-box .rdx-section { padding: 22px 32px; }
.case-modal-box .rdx-sec-body p { text-indent: 2em; }
.case-modal-state { padding: 72px 24px; text-align: center; color: var(--muted); font-size: 14px; }

@media (max-width: 640px) {
  .case-modal-overlay { padding: 0; }
  .case-modal-box { max-width: none; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .case-modal-hero { padding: 22px 18px 18px; padding-right: 58px; }
  .case-modal-box .rdx-title { font-size: 20px; }
  .case-modal-box .rdx-section { padding: 18px; }
  .case-modal-close { top: 12px; right: 12px; width: 32px; height: 32px; }
}

/* ---------- position / process library (API data) ---------- */
.list-state {
  grid-column: 1 / -1;
  padding: 56px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--r-card);
}
.list-state .proc-link { margin-left: 6px; }
.retry-btn {
  margin-left: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.retry-btn:hover { border-color: var(--blue); color: var(--blue); }
.side-loading { padding: 8px 10px; font-size: 13px; color: var(--muted); }
.pager button:disabled { opacity: .4; cursor: not-allowed; }
.pager button:disabled:hover { border-color: var(--line); color: var(--muted); }
.muted { color: var(--muted); }

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
.detail-source { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.detail-source a { color: var(--ink-2); text-decoration: none; border-bottom: 1px dashed #b9c6d6; }
.detail-source a:hover { color: var(--blue); border-bottom-color: var(--blue); }

.duty-full {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text);
  white-space: pre-line;
}
.duty-list { display: flex; flex-direction: column; gap: 14px; }
.duty-item {
  padding: 20px 22px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.duty-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.duty-no {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-tint);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.duty-head h3 { margin: 0; font-size: 15px; line-height: 1.65; color: var(--ink); font-weight: 700; }
.duty-block + .duty-block { margin-top: 14px; }
.duty-label {
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: .04em;
}
.duty-text { font-size: 14px; line-height: 1.8; color: var(--text); }
.basis-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.basis-chip {
  padding: 4px 10px;
  border: 1px solid #dbe7f8;
  border-radius: 6px;
  background: var(--blue-tint);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.6;
}
.risk-card-header .risk-level { flex: none; white-space: nowrap; }
.flowchart-draggable-img { touch-action: none; }

@media (max-width: 640px) {
  .duty-item { padding: 16px; }
  .duty-head { gap: 10px; }
  .duty-no { width: 28px; height: 28px; }
}

/* ---------- process risk ↔ position ↔ process links ---------- */
.risk-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.risk-card-footer .risk-card-pos { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pos-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pos-chip {
  display: inline-block; padding: 4px 10px;
  border: 1px solid #dbe7f8; border-radius: 999px;
  background: var(--blue-tint); color: var(--ink-2);
  font-size: 12.5px; line-height: 1.6; text-decoration: none;
}
.pos-chip:hover { border-color: var(--blue); color: var(--blue); }
.risk-modal-footer {
  display: flex; justify-content: flex-end; align-items: center;
  padding: 16px 24px; border-top: 1px solid var(--line);
}
.modal-action { font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.modal-action:hover { color: var(--orange); }

.rel-process { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: #fff; }
.rel-process + .rel-process { margin-top: 12px; }
.rel-process-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.rel-process-head h3 { font-size: 15px; font-weight: 700; color: var(--ink); }
.rel-process-no { font-size: 12px; color: var(--muted); white-space: nowrap; }
.rel-risk-list { display: flex; flex-direction: column; }
.rel-risk-card {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px dashed var(--line);
  text-decoration: none;
}
.rel-risk-card:last-child { border-bottom: none; padding-bottom: 0; }
.rel-risk-card:hover .rel-risk-title { color: var(--orange); }
.rel-risk-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.6; }
.rel-risk-meta { max-width: 300px; font-size: 12.5px; color: var(--muted); line-height: 1.6; text-align: right; }
.rel-go { font-size: 18px; color: var(--muted); line-height: 1; }
.rel-more { margin-top: 14px; }

@media (max-width: 640px) {
  .rel-risk-card { flex-wrap: wrap; gap: 4px; }
  .rel-risk-title { flex-basis: 100%; }
  .rel-risk-meta { max-width: none; text-align: left; flex: 1; }
}

/* ---------- access gate (industry subscription) ---------- */
.industry-dropdown button.locked { color: #8a97a8; }
.industry-dropdown button.locked::after {
  content: "需订阅";
  float: right;
  margin-left: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.industry-dropdown button.locked:hover { background: var(--bg); color: var(--ink-2); }

.access-gate {
  position: fixed; inset: 0; z-index: 2000;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(14, 42, 71, .48);
  backdrop-filter: blur(3px);
}
.access-gate.on { display: flex; }
.access-gate-box {
  width: 100%; max-width: 460px;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: 0 24px 60px rgba(14, 42, 71, .22);
  padding: 28px;
  animation: accessIn .18s ease-out;
}
@keyframes accessIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.access-gate-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; margin-bottom: 16px;
  border-radius: 14px;
  background: var(--orange-tint); color: var(--orange);
}
.access-gate-title { font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.access-gate-text { font-size: 14px; color: var(--muted); line-height: 1.75; }
.access-gate-actions { display: flex; gap: 10px; margin-top: 22px; }
.access-btn {
  flex: 1; padding: 11px 16px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2);
  font-size: 14px; font-weight: 600;
  transition: all .15s;
}
.access-btn:hover { border-color: var(--blue); color: var(--blue); }
.access-btn:active { transform: translateY(1px); }
.access-btn.primary {
  border-color: var(--blue); background: var(--blue); color: #fff;
}
.access-btn.primary:hover { background: #245ec5; border-color: #245ec5; color: #fff; }
.access-gate-note { margin-top: 14px; font-size: 12px; color: #8a97a8; text-align: center; }

.access-toast {
  position: fixed; left: 50%; bottom: 36px; z-index: 2100;
  transform: translate(-50%, 12px);
  max-width: min(92vw, 540px);
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--ink); color: #fff;
  font-size: 13.5px; line-height: 1.6;
  box-shadow: 0 12px 32px rgba(14, 42, 71, .24);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.access-toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 480px) {
  .access-gate-box { padding: 22px; }
  .access-gate-actions { flex-direction: column-reverse; }
}

/* ================= 首页 v2（通用库通栏 + 行业配色卡片） ================= */

/* 头部赛小犀入口 */
.main-nav a.nav-ai {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-bottom: none; border-radius: 999px;
  background: linear-gradient(135deg, #ff9d2e, #f58a00); color: #fff;
  font-size: 13px; font-weight: 700; line-height: 1.4;
  box-shadow: 0 6px 16px -6px rgba(245, 138, 0, .7);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.main-nav a.nav-ai svg { width: 13px; height: 13px; flex: none; }
.main-nav a.nav-ai:hover { color: #fff; filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 9px 20px -6px rgba(245, 138, 0, .8); }
.main-nav a.nav-ai:active { transform: scale(.97); }

/* Banner（简洁版） */
.home-hero {
  position: relative; overflow: hidden; color: #fff;
  background: #071a33 url("../images/hero-bg-dark.webp") center 42% / cover no-repeat;
  border-bottom: 1px solid #0b2340;
}
.home-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(74% 130% at 50% 42%, rgba(4, 16, 33, .78) 0%, rgba(4, 16, 33, .55) 42%, rgba(4, 16, 33, .2) 70%, rgba(4, 16, 33, .38) 100%),
    linear-gradient(180deg, rgba(4, 14, 28, .32) 0%, rgba(4, 14, 28, 0) 40%, rgba(4, 14, 28, .42) 100%);
}
.home-hero .wrap { position: relative; z-index: 1; padding-top: 44px; padding-bottom: 36px; text-align: center; }
.home-hero h1 { font-size: 32px; line-height: 1.25; color: #fff; font-weight: 700; letter-spacing: -.01em; text-shadow: 0 2px 18px rgba(0, 0, 0, .4); }
.home-hero-chips { margin-top: 12px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: #e2eefb; }
.home-hero-chips span {
  padding: 4px 12px; border: 1px solid rgba(255, 255, 255, .26); border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* 检索条 */
.home-search {
  position: relative; margin: 22px auto 0; max-width: 820px;
  display: flex; align-items: stretch; text-align: left;
  background: #fff; border: 1px solid rgba(255, 255, 255, .72); border-radius: 12px;
  box-shadow: 0 20px 44px -18px rgba(0, 0, 0, .6);
}
.home-search-lib { position: relative; flex: none; display: flex; }
.home-search-lib-btn {
  display: flex; align-items: center; gap: 6px; padding: 0 14px;
  border: 0; border-right: 1px solid var(--line); border-radius: 12px 0 0 12px;
  background: #f6f9fe; color: var(--ink-2); font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.home-search-lib-btn b { font-size: 11px; color: #8aa0bb; font-weight: 600; }
.home-search-lib-btn:hover { background: #eef4fc; }
.home-search-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
  min-width: 132px; padding: 5px; display: none;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 14px 30px -12px rgba(14, 42, 71, .3);
}
.home-search-menu.open { display: block; }
.home-search-menu button {
  display: block; width: 100%; padding: 8px 12px; border: 0; border-radius: 7px;
  background: transparent; color: #33475e; font-size: 13.5px; text-align: left; cursor: pointer;
}
.home-search-menu button:hover { background: var(--blue-tint); color: var(--ink-2); }
.home-search-menu button.on { background: var(--blue-tint); color: var(--ink); font-weight: 600; }
.home-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; padding: 13px 16px;
  font-size: 15px; color: var(--text); background: transparent;
}
.home-search input::placeholder { color: #93a4b8; }
.home-search-go {
  flex: none; border: 0; background: var(--ink-2); color: #fff;
  padding: 0 26px; font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.home-search-go:hover { background: #0f3360; }
.home-search-ai {
  flex: none; display: flex; align-items: center; gap: 6px;
  border: 0; border-left: 1px solid var(--line); border-radius: 0 12px 12px 0;
  background: #fff7ec; color: #b46400; padding: 0 20px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.home-search-ai:hover { background: #ffefd8; }
.home-search-hint { margin-top: 10px; font-size: 12.5px; color: #aec4dc; }
.home-search-hint b { color: #ffd28a; font-weight: 600; }

/* Banner KPI */
.home-kpi { margin: 18px auto 0; display: flex; justify-content: center; gap: 34px; flex-wrap: wrap; }
.home-kpi div { text-align: center; }
.home-kpi b { display: block; font-size: 21px; color: #fff; font-weight: 700; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.home-kpi i { font-style: normal; font-size: 12.5px; color: #a8c0da; }

/* 首页主体 */
.home-main { background: var(--bg); padding-bottom: 40px; }
.home-sec { padding: 30px 0 8px; }
.home-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.home-sec-head h2 { font-size: 20px; color: var(--ink); font-weight: 700; }
.home-sec-head p { margin-top: 2px; font-size: 13px; color: var(--muted); }
.home-sec-head > a { flex: none; font-size: 13px; color: var(--blue); }
.home-sec-head > a:hover { color: var(--ink-2); }

/* 风险库：通用库独立段 + 行业阵列 */
.home-sec-gen { padding-bottom: 0; }
.home-gen-head { align-items: center; }
.home-gen-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.home-gen-title h2 { font-size: 22px; }
.home-gen-tag {
  font-size: 11.5px; padding: 2px 9px; border-radius: 999px; white-space: nowrap;
  color: #8a5a00; border: 1px solid #f0d3a4; background: #fff7ea;
}
.home-gen-title .home-pill { position: static; }

/* 通用库数据带 */
.home-gen {
  position: relative; overflow: hidden;
  padding: 26px 32px; min-height: 168px; border-radius: 18px;
  border: 1px solid #163a68; cursor: pointer;
  display: flex; align-items: center;
  background: linear-gradient(100deg, #0a2140 0%, #123a6b 46%, #1b4f8c 100%);
  box-shadow: 0 18px 40px -24px rgba(9, 30, 57, .6);
}
.home-gen::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(75% 130% at 8% 120%, rgba(245, 138, 0, .22), transparent 60%),
    radial-gradient(90% 100% at 95% 0%, rgba(245, 168, 74, .14), transparent 55%);
}
.home-gen:focus-visible { outline: 3px solid rgba(45, 108, 223, .45); outline-offset: 2px; }
.home-gen-art {
  position: absolute; right: 2%; top: 50%; width: 30%; height: 100%; z-index: 1;
  transform: translateY(-50%); object-fit: contain; object-position: right center;
  mix-blend-mode: normal; opacity: .95; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 92%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 92%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-composite: intersect;
}
.home-gen-in {
  position: relative; z-index: 2; width: 100%;
  display: flex; align-items: center; gap: 32px;
  padding-right: 27%;
}
.home-gen-mets { display: flex; flex: 1; align-items: flex-end; justify-content: space-between; gap: 24px; }
.home-gen-mets span { font-size: 12px; color: #9fbcdb; white-space: nowrap; }
.home-gen-mets b { display: block; font-size: 34px; line-height: 1.1; color: #fff; font-weight: 700; }
.home-gen-mets span:first-child b { color: #ffc46b; }
.home-gen-cta {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 22px; border-radius: 9px; white-space: nowrap;
  background: linear-gradient(135deg, #ff9d2e, #f58a00); color: #fff;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 8px 20px -10px rgba(245, 138, 0, .85);
}
.home-gen:hover .home-gen-cta { filter: brightness(1.05); }

/* 授权状态标签 */
.home-pill {
  font-style: normal; font-size: 10.5px; font-weight: 700; line-height: 1.6;
  padding: 1px 8px; border-radius: 999px; white-space: nowrap;
  background: #fff; border: 1px solid #d5e2f2; color: #1a4c86;
}
.home-pill[data-ok="1"] { background: #f2faf4; border-color: #c7e2cf; color: #1f6b3a; }
.home-gen .home-pill { background: rgba(10, 33, 64, .5); border-color: rgba(255, 255, 255, .4); color: #eaf2fb; }
.home-gen .home-pill[data-ok="1"] { background: rgba(22, 101, 52, .55); border-color: rgba(160, 225, 180, .5); color: #d5f5e0; }

/* 行业卡片 */
.home-ind-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.home-ind-loading { grid-column: 1 / -1; padding: 30px 0; text-align: center; color: var(--muted); font-size: 13px; }
.home-ind {
  --c: #1a4c86; --t: rgba(26, 76, 134, .17);
  position: relative; overflow: hidden; min-height: 176px; padding: 14px 14px 12px;
  border-radius: 14px; color: var(--ink); text-decoration: none; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--c) 24%, var(--line));
  background:
    radial-gradient(108% 132% at 96% 50%, #ffffff 0%, rgba(255, 255, 255, .94) 30%, rgba(255, 255, 255, .30) 54%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(152deg, var(--t) 0%, rgba(255, 255, 255, .16) 50%, #fbfdff 86%);
  box-shadow: inset 0 3px 0 var(--c), var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.home-ind:hover {
  transform: translateY(-3px); border-color: var(--c);
  box-shadow: inset 0 3px 0 var(--c), 0 4px 10px rgba(14, 42, 71, .08), 0 18px 36px -16px rgba(14, 42, 71, .26);
}
.home-ind:focus-visible { outline: 3px solid rgba(45, 108, 223, .45); outline-offset: 2px; }
.home-ind::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, .42) 0%, rgba(255, 255, 255, .12) 45%, rgba(255, 255, 255, 0) 70%);
}
.home-ind-art {
  position: absolute; right: -16%; top: 50%; width: 92%; z-index: 2;
  transform: translateY(-50%); mix-blend-mode: multiply; opacity: .98;
  filter: contrast(1.12) saturate(1.05); pointer-events: none;
}
.home-ind > :not(.home-ind-art) { position: relative; z-index: 3; }
.home-ind .home-pill { position: absolute; top: 12px; right: 12px; z-index: 4; }
.home-ind h3 { font-size: 16px; font-weight: 700; letter-spacing: .02em; display: flex; align-items: center; gap: 7px; padding-right: 56px; }
.home-ind h3::before { content: ""; width: 8px; height: 8px; border-radius: 2.5px; background: var(--c); flex: none; }
.home-ind .home-ind-sub { margin-top: 1px; font-size: 11.5px; color: #6b819c; }
.home-ind-mets { margin-top: auto; display: flex; gap: 8px; align-items: flex-end; }
.home-ind-mets::before {
  content: ""; position: absolute; left: -14px; right: -14px; top: -16px; bottom: -12px; z-index: -1;
  background: linear-gradient(180deg, rgba(251, 253, 255, 0) 0%, rgba(251, 253, 255, .88) 46%, rgba(251, 253, 255, .97) 100%);
  pointer-events: none;
}
.home-ind-mets .m { flex: 1; min-width: 0; }
.home-ind-mets .m b { display: block; font-size: 17px; font-weight: 700; line-height: 1.15; color: var(--ink-2); }
.home-ind-mets .m:first-child b { color: var(--c); }
.home-ind-mets .m i { font-style: normal; font-size: 10.5px; color: #7b90a8; white-space: nowrap; }
.home-ind-mets .m.zero b { font-size: 11.5px; font-weight: 500; color: #9dafc2; padding-top: 4px; }
.home-ind.tobacco { --c: #b45309; --t: rgba(180, 83, 9, .24); }
.home-ind.fund { --c: #a16207; --t: rgba(161, 98, 7, .24); }
.home-ind.construction { --c: #1d4ed8; --t: rgba(29, 78, 216, .22); }
.home-ind.transport { --c: #0f766e; --t: rgba(15, 118, 110, .23); }
.home-ind.water { --c: #0369a1; --t: rgba(3, 105, 161, .22); }
.home-ind.coal { --c: #475569; --t: rgba(71, 85, 105, .24); }
.home-ind.metro { --c: #6d28d9; --t: rgba(109, 40, 217, .22); }
.home-ind.telecom { --c: #0e7490; --t: rgba(14, 116, 144, .22); }
.home-ind.international { --c: #be123c; --t: rgba(190, 18, 60, .21); }
.home-ind-note { margin-top: 12px; font-size: 12px; color: var(--muted); }

/* 四大库入口 */
.home-libs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.home-lb {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); color: var(--ink); text-decoration: none;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.home-lb:hover { transform: translateY(-2px); border-color: #c9d8ec; box-shadow: 0 12px 26px -16px rgba(14, 42, 71, .3); }
.home-lb-k {
  flex: none; width: 34px; height: 34px; border-radius: 9px;
  background: var(--blue-tint); color: var(--ink-2);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.home-lb-t { flex: 1; min-width: 0; }
.home-lb-t b { display: block; font-size: 14.5px; color: var(--ink); }
.home-lb-t i { display: block; font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-lb-n { font-size: 15px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }

/* 新法影响 */
.home-laws {
  display: grid; grid-template-columns: 330px 1fr; gap: 22px; align-items: start;
  padding: 18px 20px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
}
.home-laws h3 { font-size: 16px; color: var(--ink); }
.home-laws p { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.home-laws-go { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--blue); }
.home-laws-go:hover { color: var(--ink-2); }
.home-laws-list { display: flex; flex-direction: column; gap: 8px; }
.home-laws-list .band-item { padding: 11px 14px; background: #f8fafd; border-color: var(--line); }
.home-laws-list .band-item .law { font-size: 13.5px; color: var(--ink); }
.home-laws-list .band-item .meta { font-size: 12px; color: var(--muted); }
.home-laws-list .band-item .meta b { color: var(--orange); font-size: 15px; }
.home-laws-list .band-empty { padding: 18px 0; text-align: center; font-size: 12.5px; color: var(--muted); }

/* 响应式 */
@media (max-width: 1100px) {
  .home-ind-grid { grid-template-columns: repeat(3, 1fr); }
  .home-libs { grid-template-columns: repeat(2, 1fr); }
  .home-laws { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .home-hero h1 { font-size: 28px; }
  .home-gen { padding: 22px 24px; min-height: 150px; }
  .home-gen-art { display: none; }
  .home-gen-in { padding-right: 0; }
  .home-gen-mets b { font-size: 28px; }
  .home-kpi { gap: 18px 28px; }
}
@media (max-width: 760px) {
  .home-hero .wrap { padding-top: 34px; padding-bottom: 30px; }
  .home-hero h1 { font-size: 25px; }
  .home-hero-chips { font-size: 12.5px; }
  .home-ind-grid { grid-template-columns: repeat(2, 1fr); }
  .home-libs { grid-template-columns: 1fr; }
  .home-gen { padding: 20px 22px; min-height: 0; }
  .home-gen-in { flex-direction: column; align-items: stretch; gap: 16px; }
  .home-gen-mets { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 12px 20px; }
  .home-gen-mets b { font-size: 24px; }
  .home-gen-cta { align-self: flex-start; }
  .home-sec-head { align-items: flex-start; flex-direction: column; gap: 4px; }
}
@media (max-width: 560px) {
  .home-hero .wrap { padding-top: 28px; }
  .home-hero h1 { font-size: 23px; }
  .home-search { flex-wrap: nowrap; }
  .home-search-lib { display: none; }
  .home-search input { padding: 12px; font-size: 14px; }
  .home-search-go { padding: 0 16px; font-size: 13.5px; }
  .home-search-ai { padding: 0 12px; font-size: 13px; }
  .home-search-hint { display: none; }
  .home-kpi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 8px; max-width: 320px; }
  .home-kpi b { font-size: 19px; }
  .home-sec { padding-top: 24px; }
  .home-gen-mets { grid-template-columns: repeat(2, 1fr); gap: 14px 24px; }
  .home-gen-cta { align-self: stretch; }
  .home-ind-grid { grid-template-columns: 1fr; gap: 12px; }
  .home-ind { min-height: 150px; }
  .home-laws { padding: 16px; }
  .home-laws-list .band-item { flex-direction: column; align-items: flex-start; gap: 4px; }
  .home-laws-list .band-item .meta { margin-left: 0; text-align: left; }
}
@media (max-width: 420px) {
  body.home .brand-name { display: none; }
}

/* 大屏：首页容器随屏幕放宽，避免内容挤在中间 */
body.home .wrap { max-width: clamp(1120px, 78vw, 1520px); }
@media (min-width: 1600px) {
  .home-hero .wrap { padding-top: 56px; padding-bottom: 46px; }
  .home-hero h1 { font-size: 38px; }
  .home-hero-chips { margin-top: 14px; gap: 10px; font-size: 14px; }
  .home-hero-chips span { padding: 5px 14px; }
  .home-search { max-width: 960px; margin-top: 24px; }
  .home-search-lib-btn { padding: 0 18px; font-size: 14.5px; }
  .home-search input { padding: 15px 18px; font-size: 16px; }
  .home-search-go { padding: 0 32px; font-size: 15px; }
  .home-search-ai { padding: 0 24px; font-size: 15px; }
  .home-search-hint { margin-top: 12px; font-size: 13.5px; }
  .home-kpi { margin-top: 22px; gap: 46px; }
  .home-kpi b { font-size: 26px; }
  .home-kpi i { font-size: 13.5px; }
  .home-sec { padding-top: 38px; }
  .home-sec-head h2 { font-size: 24px; }
  .home-sec-head p, .home-sec-head > a { font-size: 14px; }
  .home-gen { padding: 30px 36px; min-height: 184px; }
  .home-gen-title h2 { font-size: 24px; }
  .home-gen-mets b { font-size: 38px; }
  .home-gen-mets span { font-size: 13px; }
  .home-gen-cta { padding: 12px 24px; font-size: 15px; }
  .home-ind-grid { gap: 18px; }
  .home-ind { min-height: 198px; padding: 16px 16px 14px; border-radius: 16px; }
  .home-ind h3 { font-size: 18px; }
  .home-ind .home-ind-sub { font-size: 12.5px; }
  .home-ind-mets .m b { font-size: 19px; }
  .home-ind-mets .m i { font-size: 11.5px; }
  .home-ind .home-pill { top: 14px; right: 14px; font-size: 11px; }
  .home-ind-note { font-size: 12.5px; }
  .home-libs { gap: 16px; }
  .home-lb { padding: 15px 18px; }
  .home-lb-k { width: 38px; height: 38px; font-size: 13px; }
  .home-lb-t b { font-size: 16px; }
  .home-lb-t i { font-size: 12.5px; }
  .home-lb-n { font-size: 16px; }
  .home-laws { grid-template-columns: 360px 1fr; gap: 26px; padding: 22px 24px; }
  .home-laws h3 { font-size: 18px; }
  .home-laws p { font-size: 13px; }
  .home-laws-go { font-size: 14px; }
  .home-laws-list .band-item .law { font-size: 14.5px; }
  .home-laws-list .band-item .meta { font-size: 13px; }
}
@media (min-width: 2000px) {
  .home-hero h1 { font-size: 42px; }
  .home-search { max-width: 1020px; }
  .home-kpi b { font-size: 28px; }
  .home-gen { min-height: 196px; }
  .home-gen-mets b { font-size: 40px; }
  .home-ind { min-height: 214px; }
  .home-ind h3 { font-size: 19px; }
  .home-ind-mets .m b { font-size: 20px; }
}
