/* ==========================================================================
   税收优惠速查 · 柔光工作台
   淡暖纸白 + 单一鼠尾草绿点缀，索引卡式政策卡片
   ========================================================================== */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #eeede7;
  --ink: #24231f;
  --ink-2: #56544c;
  --muted: #6b685d;
  --line: #e7e5dc;
  --line-strong: #d9d6ca;
  --accent: #5f7c61;
  --accent-deep: #42584a;
  --accent-soft: #e6ece1;
  --ok: #4f9d6b;
  --danger: #b0594b;

  --shadow-sm: 0 1px 2px rgba(36, 35, 31, 0.05), 0 4px 12px rgba(36, 35, 31, 0.05);
  --shadow-md: 0 2px 6px rgba(36, 35, 31, 0.05), 0 16px 40px rgba(36, 35, 31, 0.1);

  --radius: 18px;
  --font-display: 'Space Grotesk', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Courier New', monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.garden {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 640px at 82% -8%, rgba(95, 124, 97, 0.1), transparent 62%),
    radial-gradient(820px 560px at 2% 16%, rgba(95, 124, 97, 0.07), transparent 60%),
    radial-gradient(960px 720px at 92% 104%, rgba(95, 124, 97, 0.09), transparent 66%);
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   顶栏
   -------------------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }

.brand__mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.brand__mark svg { width: 36px; height: 36px; display: block; }

.brand__word { display: flex; flex-direction: column; line-height: 1.15; }

.brand__word strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand__word small {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.topbar__meta { display: flex; align-items: center; gap: 22px; }

.back {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.back:hover { color: var(--accent-deep); }

.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }

.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(79, 157, 107, 0.14);
}

/* --------------------------------------------------------------------------
   主区
   -------------------------------------------------------------------------- */
.main {
  flex: 1;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { max-width: 760px; margin-bottom: 36px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

.eyebrow__rule { width: 34px; height: 2px; background: var(--accent); border-radius: 1px; }

.hero__title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(25px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.05;
}

.hero__dot { color: var(--accent); }

.hero__lead { margin: 0; font-size: 16px; line-height: 1.7; color: var(--ink-2); max-width: 620px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
}

@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-deep);
  line-height: 1.1;
}

.stat__value--mono { font-family: var(--font-mono); font-size: 15px; }

.stat__label {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   测算面板
   -------------------------------------------------------------------------- */
.tools {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 44px;
}

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

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

.panel__title {
  margin: 0;
  padding: 14px 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  text-transform: uppercase;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.panel__body { padding: 20px; }

.field { display: block; margin-bottom: 16px; }

.field__label { display: block; font-size: 13px; color: var(--ink); margin-bottom: 6px; }

.field__control {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
}

.field__control:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(95, 124, 97, 0.14);
}

.field__control input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  padding: 11px 14px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink);
  outline: none;
}

.field__unit { padding: 0 14px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); border-left: 1px solid var(--line); }

.bars { display: flex; flex-direction: column; gap: 14px; }

.bar__meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.bar__val { font-family: var(--font-mono); font-size: 13px; color: var(--ink); }

.bar__track {
  height: 10px;
  background: var(--surface-2);
  border-radius: 6px;
  overflow: hidden;
}

.bar__fill { height: 100%; border-radius: 6px; transition: width 0.4s ease; }

.bar__fill--micro { background: var(--accent); }
.bar__fill--high { background: #8fa98b; }
.bar__fill--normal { background: #c9c5b7; }

.hint {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  border-left: 3px solid var(--line-strong);
  padding-left: 10px;
  margin: 18px 0 0;
}

.checklist { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.check__icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
}

.check.is-pass { border-color: rgba(79, 157, 107, 0.35); background: rgba(79, 157, 107, 0.06); }
.check.is-pass .check__icon { color: #fff; background: var(--ok); border-color: var(--ok); }
.check.is-fail { border-color: rgba(176, 89, 75, 0.3); background: rgba(176, 89, 75, 0.05); }
.check.is-fail .check__icon { color: #fff; background: var(--danger); border-color: var(--danger); }

.verdict {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.verdict--pass { background: var(--accent-soft); color: var(--accent-deep); }
.verdict--fail { background: rgba(176, 89, 75, 0.08); color: var(--danger); }

/* --------------------------------------------------------------------------
   政策清单
   -------------------------------------------------------------------------- */
.catalog__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.section-kicker {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}

.catalog__head h2 { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 700; }

.launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(360px, 100%);
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.launcher:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(95, 124, 97, 0.12); }

.launcher__icon { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 1.8; stroke-linecap: round; }

.launcher input { flex: 1; min-width: 0; border: none; background: none; font-size: 14px; color: var(--ink); outline: none; }

.launcher__clear {
  width: 22px;
  height: 22px;
  display: none;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  font-size: 16px;
}

.launcher__clear.is-visible { display: grid; }
.launcher__clear:hover { background: var(--surface-2); color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }

.chip {
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--surface);
  transition: all 0.15s ease;
}

.chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.policy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

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

.policy-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.policy-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.policy-card__fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 34px;
  height: 34px;
  background: linear-gradient(225deg, var(--accent) 0%, var(--accent) 50%, var(--surface) 50%, var(--surface) 100%);
  opacity: 0.9;
}

.policy-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-right: 26px; }

.policy-card__code {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 5px 9px;
  border-radius: 7px;
  text-transform: uppercase;
}

.policy-card__valid {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.policy-card h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1.3; }

.policy-card__headline {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-deep);
  margin-bottom: 10px;
}

.policy-card__detail { margin: 0 0 14px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }

.policy-card__conditions { margin: 0 0 14px; padding-left: 0; list-style: none; }

.policy-card__conditions li {
  position: relative;
  padding-left: 16px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 4px;
}

.policy-card__conditions li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

.policy-card__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; margin-bottom: 14px; }

.policy-card__tags span {
  font-size: 11.5px;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 7px;
}

.policy-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.policy-card__source { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

.policy-card__badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ok);
  white-space: nowrap;
  flex-shrink: 0;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.empty__title { margin: 0 0 8px; font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.empty__text { margin: 0; font-size: 13px; color: var(--muted); }

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 600px) { .footer { flex-direction: column; align-items: flex-start; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
