/* ============================================================
 * style.css —— 限行尾号查询网（仅本站使用）
 * 限行信息台风格：深色头部 + 橙红警示主色 + 尾号大字方块主视觉。
 * ============================================================ */
:root {
  --xx-brand: #ea580c;
  --xx-brand-dark: #9a3412;
  --xx-brand-deep: #c2410c;
  --xx-soft: #ffedd5;
  --xx-line-soft: #fed7aa;
  --xx-dark: #1c1917;
  --xx-dark-2: #292524;
  --xx-bg: #fafaf9;
  --xx-card: #ffffff;
  --xx-text: #292524;
  --xx-muted: #78716c;
  --xx-line: #e7e0d8;
  --xx-green: #15803d;
  --xx-green-soft: #dcfce7;
  --xx-radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--xx-bg); color: var(--xx-text);
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.6;
}
.xx-wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
a { color: inherit; }

/* ---------- 品牌条：深色警示底 + 橙色强调 ---------- */
.xx-top {
  background: linear-gradient(150deg, var(--xx-dark-2), var(--xx-dark) 70%);
  color: #fff; border-bottom: 4px solid var(--xx-brand); padding: 20px 0 22px;
}
.xx-top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.xx-brand { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.xx-brand b { color: #fb923c; }
.xx-slogan { margin: 4px 0 0; font-size: 13px; color: #d6d3d1; }
.xx-mini {
  flex: 0 0 auto; margin: 0; text-align: center; font-size: 11px; color: #e7e5e4;
  border: 1px dashed rgba(255, 255, 255, .45); border-radius: 10px; padding: 8px 10px; max-width: 180px; line-height: 1.7;
}
@media (max-width: 520px) { .xx-mini { display: none; } }

/* ---------- 广告位（≤90px） ---------- */
.xx-ad {
  min-height: 60px; max-height: 90px; margin: 14px 0;
  border: 1px dashed var(--xx-line); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--xx-muted); font-size: 12.5px; background: var(--xx-card); overflow: hidden;
}

/* ---------- 查询面板 ---------- */
.xx-hero { padding: 12px 0 4px; }
.xx-hero h1 { font-size: 24px; margin: 0 0 6px; color: var(--xx-dark); }
.xx-hero h1 b { color: var(--xx-brand); }
.xx-sub { margin: 0 0 14px; font-size: 14px; color: var(--xx-muted); }
.xx-card {
  background: var(--xx-card); border: 1px solid var(--xx-line); border-top: 4px solid var(--xx-brand);
  border-radius: var(--xx-radius); padding: 22px;
  box-shadow: 0 1px 3px rgba(154, 52, 18, .05), 0 10px 28px rgba(154, 52, 18, .08);
}
.xx-filters { display: flex; gap: 12px; }
.xx-field { display: flex; flex-direction: column; gap: 6px; }
.xx-field-grow { flex: 1; }
.xx-label { font-size: 12.5px; font-weight: 600; color: var(--xx-muted); }
.xx-city, .xx-area {
  height: 46px; padding: 0 12px; border: 1.5px solid var(--xx-line); border-radius: 8px;
  font-size: 15px; color: var(--xx-text); background: #fff; outline: none; min-width: 0;
}
.xx-city:focus, .xx-area:focus { border-color: var(--xx-brand); }
.xx-city {
  appearance: none; -webkit-appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23ea580c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

/* ---------- 日期胶囊 chips ---------- */
.xx-days { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.xx-chip {
  padding: 7px 14px; border: 1.5px solid var(--xx-line); border-radius: 999px;
  background: #fff; font-size: 13px; color: var(--xx-text); cursor: pointer; font-family: inherit;
}
.xx-chip:hover { border-color: var(--xx-brand); color: var(--xx-brand); }
.xx-chip[aria-pressed="true"] { background: var(--xx-brand); border-color: var(--xx-brand); color: #fff; font-weight: 700; }

/* ---------- 操作按钮：橙红渐变主按钮 ---------- */
.xx-actions { display: flex; gap: 10px; margin-top: 16px; }
.xx-btn-main {
  min-width: 132px; height: 46px; border: none; border-radius: 8px;
  background: linear-gradient(135deg, #f97316, var(--xx-brand) 60%, var(--xx-brand-deep));
  color: #fff; font-size: 16px; font-weight: 700; letter-spacing: 4px; text-indent: 4px; cursor: pointer;
  box-shadow: 0 4px 10px rgba(234, 88, 12, .3);
}
.xx-btn-main:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.xx-btn-ghost {
  height: 46px; padding: 0 18px; border: 1.5px solid var(--xx-line); border-radius: 8px;
  background: #fff; color: var(--xx-muted); font-size: 14px; cursor: pointer;
}
.xx-btn-ghost:hover { border-color: var(--xx-brand); color: var(--xx-brand); }

/* ---------- 维护横条 ---------- */
.xx-banner {
  display: none; margin: 14px 0 0; padding: 10px 14px; border-radius: 8px;
  font-size: 13px; background: #fef3c7; border: 1px solid #fde68a; color: #92400e;
}

/* ---------- 四态面板（data-state 控制显隐） ---------- */
.xx-panel { margin-top: 4px; }
.xx-panel-default, .xx-panel-loading, .xx-panel-result, .xx-panel-empty { display: none; }
.xx-panel[data-state="idle"] .xx-panel-default { display: block; }
.xx-panel[data-state="loading"] .xx-panel-loading { display: flex; align-items: center; justify-content: center; gap: 10px; }
.xx-panel[data-state="result"] .xx-panel-result { display: block; }
.xx-panel[data-state="empty"] .xx-panel-empty { display: block; }
.xx-hint { margin: 16px 0 2px; text-align: center; font-size: 13.5px; color: var(--xx-muted); }
.xx-panel-loading { margin-top: 16px; color: var(--xx-muted); font-size: 14px; }
.xx-spin {
  width: 18px; height: 18px; border: 3px solid var(--xx-soft); border-top-color: var(--xx-brand);
  border-radius: 50%; animation: xx-spin .8s linear infinite;
}
@keyframes xx-spin { to { transform: rotate(360deg); } }

/* ---------- 结果态：尾号大字方块主视觉 ---------- */
.xx-result-headline { margin: 18px 0 0; font-size: 17px; color: var(--xx-text); }
.xx-result-headline strong { color: var(--xx-brand-dark); font-size: 20px; margin-right: 4px; }
.xx-tails { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0 2px; }
.xx-tail {
  width: 84px; height: 84px; display: flex; align-items: center; justify-content: center;
  font-size: 44px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums;
  background: linear-gradient(145deg, #fb923c, var(--xx-brand) 55%, var(--xx-brand-deep));
  border-radius: 14px; box-shadow: 0 6px 16px rgba(234, 88, 12, .32);
}
.xx-tails-none {
  display: none; margin: 14px 0 2px; padding: 10px 18px; border-radius: 10px;
  font-size: 30px; font-weight: 800; color: var(--xx-green); background: var(--xx-green-soft);
}
.xx-rule-badge {
  display: none; margin: 12px 0 0; padding: 4px 14px; width: fit-content;
  font-size: 13px; font-weight: 700; color: var(--xx-brand-dark);
  background: var(--xx-soft); border: 1px solid var(--xx-line-soft); border-radius: 999px;
}
.xx-fields { display: none; flex-direction: column; margin-top: 12px; border: 1px solid var(--xx-line); border-radius: 10px; overflow: hidden; }
.xx-fields-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 14px; font-size: 13.5px; background: #fff; }
.xx-fields-row + .xx-fields-row { border-top: 1px solid var(--xx-line); }
.xx-k { color: var(--xx-muted); }
.xx-v { font-weight: 700; color: var(--xx-dark); }
.xx-strong .xx-v { color: var(--xx-brand-dark); }
.xx-rule-area-note {
  display: none; margin: 12px 0 0; padding: 8px 12px; border-radius: 8px;
  font-size: 13px; color: var(--xx-brand-dark); background: var(--xx-soft);
}
.xx-result-meta {
  margin: 14px 0 0; padding-top: 10px; border-top: 1px dashed var(--xx-line);
  font-size: 12.5px; color: var(--xx-muted);
}
.xx-result-meta .xx-src { color: var(--xx-brand-dark); font-weight: 600; }
.xx-result-meta .xx-note { color: var(--xx-muted); }

/* ---------- 无结果态 ---------- */
.xx-panel-empty { margin-top: 18px; text-align: center; padding: 6px 0 2px; }
.xx-empty-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--xx-text); }
.xx-empty-sub { margin: 0 0 14px; font-size: 13.5px; color: var(--xx-muted); }
.xx-btn-sub {
  height: 42px; padding: 0 20px; border: 1.5px solid var(--xx-brand); border-radius: 8px;
  background: #fff; color: var(--xx-brand); font-size: 14px; font-weight: 600; cursor: pointer;
}
.xx-btn-sub:hover { background: var(--xx-brand); color: #fff; }
.xx-empty-link { display: inline-block; margin-left: 12px; font-size: 13.5px; color: var(--xx-brand); text-decoration: none; }
.xx-empty-link:hover { text-decoration: underline; }

/* ---------- 相关查询 ---------- */
.xx-links { margin: 26px 0 8px; }
.xx-links h2, .xx-content h2, .xx-cities h2 {
  font-size: 16px; margin: 0 0 10px; color: var(--xx-dark);
  border-left: 4px solid var(--xx-brand); padding-left: 10px;
}
.xx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.xx-chips a {
  padding: 8px 14px; background: #fff; border: 1px solid var(--xx-line);
  border-radius: 6px; font-size: 13.5px; text-decoration: none; color: var(--xx-text);
}
.xx-chips a:hover { border-color: var(--xx-brand); color: var(--xx-brand); background: var(--xx-soft); }

/* ---------- FAQ 内容区（构建期生成，类名 xx-content / xx-ai-badge / xx-src-note） ---------- */
.xx-content {
  margin: 26px 0; background: #fff; border: 1px solid var(--xx-line);
  border-radius: var(--xx-radius); padding: 18px 20px;
}
.xx-content article { margin-bottom: 14px; }
.xx-content article:last-child { margin-bottom: 0; }
.xx-content h3 { font-size: 14.5px; margin: 0 0 6px; }
.xx-content p { font-size: 13.5px; color: #57534e; margin: 0 0 4px; }
.xx-src-note { font-size: 12px; color: var(--xx-muted); }
.xx-ai-badge {
  display: inline-block; padding: 1px 8px; margin-left: 6px;
  font-size: 11px; font-weight: 600; vertical-align: 1px;
  color: var(--xx-brand-dark); background: var(--xx-soft); border: 1px solid var(--xx-line-soft); border-radius: 999px;
}

/* ---------- 城市查询矩阵 ---------- */
.xx-cities { margin: 26px 0; }
.xx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.xx-grid a {
  padding: 9px 6px; text-align: center; background: #fff; border: 1px solid var(--xx-line);
  border-radius: 8px; font-size: 13.5px; text-decoration: none; color: var(--xx-text);
}
.xx-grid a:hover { border-color: var(--xx-brand); color: var(--xx-brand); background: var(--xx-soft); }

/* ---------- 合规页脚（构建期生成：xx-foot / xx-links / xx-disc / xx-src / xx-ai） ---------- */
.xx-foot { background: #fff; border-top: 1px solid var(--xx-line); margin-top: 24px; }
.xx-foot .xx-wrap { padding-top: 24px; padding-bottom: 32px; }
.xx-foot .xx-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; font-size: 13px; }
.xx-foot a { color: inherit; text-decoration: none; }
.xx-foot a:hover { color: var(--xx-brand); text-decoration: underline; }
.xx-foot .xx-strong { font-weight: 600; color: var(--xx-text); }
.xx-foot .xx-disc, .xx-foot .xx-src, .xx-foot .xx-ai { margin: 0 0 6px; font-size: 12.5px; color: var(--xx-muted); line-height: 1.9; }

/* ---------- 移动适配 ---------- */
@media (max-width: 520px) {
  .xx-card { padding: 16px 14px; }
  .xx-filters { flex-direction: column; }
  .xx-btn-main { flex: 1; min-width: 0; }
  .xx-tail { width: 64px; height: 64px; font-size: 34px; border-radius: 12px; }
  .xx-tails { gap: 10px; }
  .xx-tails-none { font-size: 22px; padding: 8px 14px; }
  .xx-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
}
