:root {
  --nav: #27313F;
  --ink: #27313F;
  --muted: #62748A;
  --ink3: #62748A;
  --blue: #5A9DE2;
  --blue-ink: #2D6A9F;
  --blue-soft: #EAF4FF;
  --green: #197B43;
  --green-soft: #E6F6EC;
  --orange: #996000;
  --orange-soft: #FDF1DC;
  --red: #D83A3A;
  --red-soft: #FCEBE9;
  --qlqx-yoy-strong-positive: var(--blue-ink);
  --qlqx-yoy-positive: var(--green);
  --qlqx-yoy-neutral: var(--muted);
  --qlqx-yoy-warning: var(--orange);
  --qlqx-yoy-danger: var(--red);
  --bg: #F4F8FC;
  --white: #FFFFFF;
  --surface: #F8FBFE;
  --expense-bg: #F8FBFE;
  --line: #D6E4F1;
  --line2: #E9F0F7;
  --border: #D6E4F1;
  --notice: #EFF5FA;
  --shadow: 0 1px 2px rgba(39, 49, 63, .05), 0 6px 14px rgba(39, 49, 63, .04);
  --shadow-soft: 0 1px 2px rgba(39, 49, 63, .05), 0 6px 14px rgba(39, 49, 63, .04);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--nav);
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
}
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pw-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(24px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom));
  background: var(--bg);
}
.pw-card {
  position: relative;
  width: min(360px, 100%);
  overflow: hidden;
  padding: 34px 32px 30px;
  border: 1px solid rgba(208, 217, 229, 0.72);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: center;
}
.pw-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: var(--nav);
}
.pw-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: var(--nav);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(18, 32, 58, 0.18);
}
.pw-card h1 { margin: 0 0 10px; color: var(--nav); font-size: 24px; line-height: 1.22; }
.pw-card p { margin: 0 0 26px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.pw-form { display: grid; gap: 13px; text-align: left; }
.pw-form label, .search label { color: var(--muted); font-size: 14px; font-weight: 800; }
.pw-form input, .search input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: 0;
  padding: 0 15px;
  background: var(--white);
  color: var(--nav);
  font-size: 16px;
  box-shadow: inset 0 1px 0 rgba(18, 32, 58, 0.02);
}
.pw-form input:focus, .search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(39, 91, 220, 0.12);
}
.pw-form input.is-error { border-color: var(--red); animation: shake .35s; }
.pw-form button {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  background: var(--nav);
  color: var(--white);
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(18, 32, 58, 0.15);
}
.pw-note, .form-error {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}
.form-error { margin-top: 0; color: var(--red); text-align: left; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 62px; }
.password-field > button {
  position: absolute;
  top: 50%;
  right: 6px;
  min-height: 38px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  padding: 0 11px;
  background: transparent;
  box-shadow: none;
  color: var(--blue-ink);
  font-size: 14px;
  font-weight: 800;
}
.pw-hint {
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
/* 需要压过 .pw-form button 的主按钮样式，否则次要操作会长成第二个主按钮。 */
.pw-form button.pw-switch-account {
  background: transparent;
  box-shadow: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}
.profile-account { margin-bottom: 10px; color: var(--muted); font-size: 14px; }
.profile-account b { color: var(--nav); }
.loading-card h1 { font-size: 18px; }
.env-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 12px;
  padding: 4px 9px;
  border: 1px solid #F1C84B;
  border-radius: 999px;
  background: #FFF3CD;
  color: #7A4B00;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  white-space: normal;
}
.nav-kicker .env-badge {
  margin: 0 0 0 6px;
  vertical-align: middle;
}
.env-watermark {
  position: fixed;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 60;
  max-width: calc(100vw - 20px);
  padding: 7px 10px;
  border: 1px solid rgba(241, 200, 75, 0.84);
  border-radius: 10px;
  background: rgba(255, 243, 205, 0.94);
  color: #7A4B00;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: var(--shadow-soft);
}

.app-screen { min-height: 100dvh; background: var(--bg); }
.top-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 10px;
  border-bottom: 1px solid rgba(210, 210, 215, 0.72);
  background: #FFFFFF;
  color: var(--nav);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.035);
}
.nav-kicker { margin-bottom: 4px; color: var(--muted); font-size: 12px; line-height: 1.1; }
.nav-title { color: var(--nav); font-size: 18px; font-weight: 800; line-height: 1.16; }
.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav-right { text-align: right; color: var(--muted); font-size: 12px; white-space: nowrap; }
.nav-right strong { display: block; margin-top: 3px; color: var(--nav); font-size: 13px; }
.notice-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(39, 91, 220, 0.16);
  border-radius: 10px;
  background: rgba(39, 91, 220, 0.08);
  color: var(--blue-ink);
}
.notice-bell svg {
  width: 20px;
  height: 20px;
}
.notice-bell i {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border: 2px solid var(--white);
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}
.route-toast {
  position: sticky;
  top: calc(62px + env(safe-area-inset-top));
  z-index: 9;
  margin: 10px auto 0;
  width: min(900px, calc(100% - 28px));
  padding: 11px 14px;
  border: 1px solid rgba(39, 91, 220, 0.24);
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}
.retry-banner {
  position: sticky;
  top: calc(62px + env(safe-area-inset-top));
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px auto 0;
  width: min(900px, calc(100% - 28px));
  padding: 10px 12px 10px 14px;
  border: 1px solid rgba(216, 58, 58, 0.24);
  border-radius: 12px;
  background: var(--red-soft);
  color: var(--red);
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}
.retry-banner button {
  min-height: 32px;
  border: 0;
  border-radius: 9px;
  padding: 0 13px;
  background: var(--red);
  color: var(--white);
  font-weight: 800;
}

.detail-tabs {
  position: sticky;
  top: calc(62px + env(safe-area-inset-top));
  z-index: 9;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #FFFFFF;
}
.detail-tabs button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.detail-tabs button.active {
  border-color: rgba(39, 91, 220, 0.20);
  background: var(--blue-soft);
  color: var(--blue-ink);
}

.page {
  width: min(480px, 100%);
  margin: 0 auto;
  padding: 12px 12px calc(88px + env(safe-area-inset-bottom));
}
.detail-tabs + .page { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 2px 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}
.section-title::before { display: none; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.hero-panel {
  overflow: hidden;
  margin: 0 0 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 900;
}
.hero-head h1 { margin: 0; color: var(--nav); font-size: 22px; line-height: 1.14; }
.hero-pill, .hero-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.hero-pill.green { background: var(--green-soft); color: var(--green); }
.hero-pill.red { background: var(--red-soft); color: var(--red); }
/* 返回是详情页的主要退出路径，保证 44pt 可点区域。 */
.hero-back { min-height: 44px; padding: 0 14px; background: var(--nav); color: var(--white); }
.hero-meter {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface);
}
.hero-meter > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.hero-meter strong { color: var(--nav); font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.period-eyebrow {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}
.hero-yoy-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 12px;
  margin: 13px 0 15px;
  padding: 14px;
  border: 1px solid rgba(39, 91, 220, 0.16);
  border-radius: 8px;
  background: var(--surface);
}
.hero-yoy-main span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.hero-yoy-main strong {
  display: block;
  color: var(--nav);
  font-size: 26px;
  line-height: 1.05;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.hero-yoy-main small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.hero-stats.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hero-stat {
  min-width: 0;
  padding: 11px 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--white);
}
.hero-stat span, .hero-stat small {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}
.hero-stat strong {
  display: block;
  margin: 4px 0 3px;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 900;
  overflow-wrap: anywhere;
  white-space: normal;
  font-variant-numeric: tabular-nums;
}
.tone-border-green { border-left-color: var(--green); }
.tone-border-orange { border-left-color: var(--orange); }
.tone-border-red { border-left-color: var(--red); }
.tone-border-blue { border-left-color: var(--blue); }
.tone-border-strong-positive { border-left-color: var(--qlqx-yoy-strong-positive); }
.tone-border-positive { border-left-color: var(--qlqx-yoy-positive); }
.tone-border-warning { border-left-color: var(--qlqx-yoy-warning); }
.tone-border-danger { border-left-color: var(--qlqx-yoy-danger); }
.tone-border-gray { border-left-color: var(--qlqx-yoy-neutral); }
.county-meta {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin: -2px 0 12px;
  padding-bottom: 2px;
}
.county-meta span {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.county-hero {
  display: grid;
  gap: 12px;
}

.county-hero .period-eyebrow {
  margin-top: 0;
}

.county-sales-card {
  display: grid;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  background: var(--white);
}

.county-sales-head,
.county-sales-main,
.county-sales-foot {
  min-width: 0;
}

.county-sales-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.county-sales-head span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 750;
}

.county-sales-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(76px, max-content);
  gap: 10px;
  align-items: end;
  min-width: 0;
  overflow: hidden;
}

.county-sales-main strong {
  min-width: 0;
  color: var(--ink);
  font-size: 42px;
  line-height: .96;
  font-weight: 800;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.county-sales-main small {
  margin-left: 5px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.county-sales-main div {
  display: grid;
  gap: 3px;
  justify-items: end;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 650;
  text-align: right;
}

.county-sales-main em {
  color: var(--ink);
  font-style: normal;
}

.county-sales-card .progress {
  height: 6px;
}

.county-sales-foot {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 650;
}

.county-process-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.county-process-mini {
  display: grid;
  min-width: 0;
  min-height: 86px;
  align-content: start;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.county-process-mini span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.county-process-mini strong {
  min-width: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.05;
  font-weight: 800;
  overflow: visible;
  white-space: normal;
  font-variant-numeric: tabular-nums;
}

.county-process-mini small {
  display: block;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.15;
  font-weight: 650;
  overflow-wrap: break-word;
  word-break: normal;
  white-space: normal;
}

.yoy-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #EEF1F6;
  font-size: 12px;
  line-height: 1;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.metric-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-grid.four-yoy { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-grid:not(.four) .metric-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.metric-card {
  position: relative;
  min-width: 0;
  min-height: 104px;
  overflow: visible;
  padding: 12px 11px 11px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.tone-line-blue { border-left-color: var(--blue); }
.tone-line-green { border-left-color: var(--green); }
.tone-line-orange { border-left-color: var(--orange); }
.tone-line-red { border-left-color: var(--red); }
.yoy-tone-line-strong-positive { border-left-color: var(--qlqx-yoy-strong-positive); }
.yoy-tone-line-positive { border-left-color: var(--qlqx-yoy-positive); }
.yoy-tone-line-warning { border-left-color: var(--qlqx-yoy-warning); }
.yoy-tone-line-danger { border-left-color: var(--qlqx-yoy-danger); }
.yoy-tone-line-gray { border-left-color: var(--qlqx-yoy-neutral); }
.metric-label, .metric-sub { color: var(--muted); font-size: 13px; line-height: 1.38; }
.metric-label { font-weight: 800; white-space: normal; overflow-wrap: anywhere; }
.metric-value {
  margin: 9px 0 7px;
  color: var(--blue-ink);
  font-size: 23px;
  font-weight: 900;
  line-height: 1.05;
  overflow-wrap: anywhere;
  white-space: normal;
  font-variant-numeric: tabular-nums;
}
.yoy-card { min-height: 124px; }
.yoy-card .metric-value {
  color: var(--nav);
  font-size: 28px;
}
.metric-current {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
}
.metric-current span,
.metric-current small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.yoy-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.38;
  font-variant-numeric: tabular-nums;
}
.yoy-value { font-size: 15px; }
.yoy-tone-strong-positive, .planning-summary .yoy-tone-strong-positive { color: var(--qlqx-yoy-strong-positive); }
.yoy-tone-positive, .planning-summary .yoy-tone-positive { color: var(--qlqx-yoy-positive); }
.yoy-tone-warning, .planning-summary .yoy-tone-warning { color: var(--qlqx-yoy-warning); }
.yoy-tone-danger, .planning-summary .yoy-tone-danger { color: var(--qlqx-yoy-danger); }
.yoy-tone-gray, .planning-summary .yoy-tone-gray { color: var(--qlqx-yoy-neutral); }
.channel-health-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.big-card {
  margin-bottom: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.county-filter-card {
  position: sticky;
  top: calc(70px + env(safe-area-inset-top));
  z-index: 8;
}
.sticky-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.sticky-summary strong {
  color: var(--nav);
  font-size: 15px;
  font-weight: 900;
}
.sticky-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(110px, .5fr) minmax(140px, .7fr) auto;
  align-items: end;
  gap: 8px;
}
.filter-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.filter-grid input,
.filter-grid select {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--nav);
  padding: 0 10px;
  outline: 0;
}
.filter-grid input:focus,
.filter-grid select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(39, 91, 220, 0.10);
}
.filter-actions {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(44px, 1fr));
  gap: 6px;
}
.filter-actions button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(39, 91, 220, 0.18);
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 900;
}
.filter-actions svg {
  width: 16px;
  height: 16px;
}
.bc-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.bc-header h2 { margin: 0; color: var(--nav); font-size: 16px; font-weight: 900; }
.bc-tag, .chip, .status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.status-tag { justify-content: center; color: var(--white); background: var(--red); }
.tag-blue { background: var(--blue); }
.tag-green { background: var(--green); }
.tag-gray { background: var(--muted); }
.tag-orange { background: var(--orange); }
.tag-red { background: var(--red); }
.chip-row {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 1px 1px 3px;
}
.chip {
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.chip.active { border-color: rgba(39, 91, 220, 0.32); color: var(--blue-ink); background: var(--blue-soft); }
.quick-filter-row {
  margin-top: 10px;
}
.filter-chip {
  min-height: 34px;
}
.progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}
.fill { display: block; height: 100%; max-width: 100%; border-radius: 999px; background: var(--blue); }
.fill.green { background: var(--green); }
.fill.orange { background: var(--orange); }
.fill.red { background: var(--red); }
.fill.blue { background: var(--blue); }

.analysis-card,
.planning-trend-card {
  padding: 12px 13px;
}

.planning-analysis-list {
  display: grid;
}

.planning-analysis-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line2);
}

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

.planning-analysis-row span {
  min-width: 0;
}

.planning-analysis-row strong,
.planning-analysis-row small {
  display: block;
}

.planning-analysis-row strong {
  color: var(--ink);
  font-size: 13px;
}

.planning-analysis-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.planning-analysis-row b {
  max-width: 132px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: normal;
}

.planning-composition-card {
  padding: 12px 13px;
}

.planning-pie-legend {
  display: flex;
  gap: 14px;
  margin: 8px 0 2px;
  color: var(--muted);
  font-size: 11px;
}

.planning-pie-legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.planning-pie-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.planning-pie-legend .is-month {
  background: var(--blue);
}

.planning-pie-legend .is-rest {
  background: var(--line2);
}

.planning-pie-list {
  display: grid;
}

.planning-pie-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(86px, auto);
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line2);
}

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

.planning-pie {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line2);
  border-radius: 50%;
  background: conic-gradient(var(--blue) 0 var(--slice), var(--line2) var(--slice) 100%);
}

.planning-pie-month,
.planning-pie-annual {
  min-width: 0;
}

.planning-pie-month strong,
.planning-pie-month small,
.planning-pie-annual strong,
.planning-pie-annual small {
  display: block;
}

.planning-pie-month strong,
.planning-pie-annual strong {
  color: var(--ink);
  font-size: 13px;
}

.planning-pie-month small,
.planning-pie-annual small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.planning-pie-annual {
  text-align: right;
}

.trend-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 10px 0 4px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: var(--line2);
}

.trend-summary span {
  min-width: 0;
  padding: 9px 8px;
  background: var(--white);
}

.trend-summary small,
.trend-summary strong {
  display: block;
}

.trend-summary small {
  color: var(--muted);
  font-size: 10px;
}

.trend-summary strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.county-row {
  display: grid;
  gap: 10px;
  min-height: 150px;
}
.county-row:active { background: var(--notice); }
.county-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.county-main {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.county-rank {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--nav);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.county-row h3 {
  margin: 0 0 5px;
  overflow: hidden;
  color: var(--nav);
  font-size: 16px;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.county-row p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-yoy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.mini-yoy {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.mini-yoy b {
  color: var(--muted);
  font-weight: 900;
}
.county-sales-line {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tone-green { color: var(--green); }
.tone-orange { color: var(--orange); }
.tone-red { color: var(--red); }
.tone-blue { color: var(--blue-ink); }
.tone-strong-positive { color: var(--qlqx-yoy-strong-positive); }
.tone-positive { color: var(--qlqx-yoy-positive); }
.tone-warning { color: var(--qlqx-yoy-warning); }
.tone-danger { color: var(--qlqx-yoy-danger); }
.tone-gray { color: var(--qlqx-yoy-neutral); }
.overview-footnote {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.pool-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.pool-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(208, 217, 229, 0.76);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}
.pool-1 { background: var(--blue-soft); }
.pool-2 { background: var(--orange-soft); }
.pool-card strong { display: inline-block; margin: 9px 0 4px; color: var(--nav); font-size: 21px; line-height: 1; }
.pool-card > span.metric-sub { display: block; margin-top: 2px; line-height: 1.45; }
.cost-overview-card {
  border-color: rgba(39, 91, 220, 0.18);
  background: var(--white);
}
.cost-hero-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 2px 0 12px;
  color: var(--nav);
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cost-hero-value small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.cost-split-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}
.cost-split-grid div,
.cost-pill-row {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface);
}
.cost-split-grid span,
.cost-pill-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}
.cost-split-grid strong,
.cost-pill-row strong {
  display: block;
  margin-top: 5px;
  color: var(--nav);
  font-size: 15px;
  line-height: 1.15;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.cost-pill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.cost-pill-row strong { margin-top: 0; white-space: nowrap; }
.county-cost-card {
  border-left: 3px solid var(--blue);
}
.activity-item, .notice-item, .terminal-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.activity-item:last-child, .notice-item:last-child, .terminal-item:last-child { border-bottom: 0; }
.notice-card { border-left: 4px solid var(--blue); background: var(--surface); }
.notice-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.notice-head time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.notice-item strong, .activity-item strong { display: block; color: var(--nav); font-size: 15px; font-weight: 900; }
.notice-item p { margin: 6px 0 0; color: var(--ink); font-size: 14px; line-height: 1.56; }
.notice-more { width: 100%; margin-top: 8px; }
.terminal-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 11px;
  background: var(--line);
  color: var(--nav);
  font-size: 13px;
  font-weight: 900;
}
.rank-1 { background: var(--orange); color: var(--white); }
.rank-2 { background: var(--blue); color: var(--white); }
.rank-3 { background: var(--nav); color: var(--white); }
.terminal-name strong, .terminal-name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.terminal-name strong { color: var(--nav); font-size: 15px; font-weight: 900; }
.terminal-name span, .terminal-data { color: var(--muted); font-size: 13px; line-height: 1.45; }
.terminal-data { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.search { display: grid; gap: 7px; margin-bottom: 12px; }
.chart-wrap { position: relative; height: 224px; }
.county-chart-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.county-chart-content { width: max(100%, calc(var(--month-count) * 80px)); }
.county-chart-differences { display: grid; grid-template-columns: repeat(var(--month-count), 1fr); text-align: center; font-size: 12px; padding-bottom: 8px; }
.county-chart-differences b { display: block; margin-top: 3px; }
.county-chart-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { display: block; width: 14px; height: 6px; border-radius: 999px; }
.legend-blue { background: var(--blue); }
.legend-orange { background: var(--orange); }
.legend-line { border-top: 2px dashed var(--nav); }
.planning-chart-empty {
  display: grid;
  gap: 3px;
  margin: 12px 0 4px;
  padding: 14px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: var(--surface-soft);
}
.planning-chart-empty strong { color: var(--ink); font-size: 14px; }
.planning-chart-empty span { color: var(--muted); font-size: 11px; }

.bottom-nav {
  position: fixed;
  right: 10px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: 10px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  max-width: 560px;
  margin: 0 auto;
  border: 1px solid rgba(208, 217, 229, 0.88);
  border-radius: 18px;
  background: #FFFFFF;
  padding: 6px;
  box-shadow: 0 14px 28px rgba(18, 32, 58, 0.14);
}

.profile-sheet {
  position: fixed;
  inset: 0;
  /* 必须高于 .bottom-nav(z-index 20),否则遮罩盖不住底部导航。 */
  z-index: 40;
  display: grid;
  align-items: end;
}
.profile-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 32, 58, 0.26);
}
.profile-panel {
  position: relative;
  z-index: 1;
  max-width: 560px;
  width: calc(100% - 20px);
  margin: 0 auto calc(82px + env(safe-area-inset-bottom));
  padding: 16px;
  border: 1px solid rgba(208, 217, 229, 0.88);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 36px rgba(18, 32, 58, 0.18);
}

.drawer-open {
  overflow: hidden;
}

.data-drawer {
  position: fixed;
  inset: 0;
  z-index: 46;
  display: grid;
  align-items: end;
}

.drawer-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 32, 58, 0.34);
}

.drawer-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(560px, 100%);
  max-height: min(78vh, 760px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(208, 217, 229, 0.94);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: #FFFFFF;
  box-shadow: 0 -22px 42px rgba(18, 32, 58, 0.2);
}

.drawer-panel-tall {
  max-height: min(84vh, 820px);
}

.drawer-handle {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: #D7DEE8;
  transform: translateX(-50%);
}

.drawer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  padding: 22px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.drawer-head span,
.drawer-head strong {
  display: block;
}

.drawer-head span {
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 800;
}

.drawer-head strong {
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.drawer-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
  background: #F3F6FB;
}

.drawer-tabs {
  position: sticky;
  top: -14px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: -14px -14px 12px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--line);
  background: #FFFFFF;
}

.drawer-tabs-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.drawer-tabs button {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 48px;
  padding: 7px 4px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.drawer-tabs svg {
  width: 17px;
  height: 17px;
}

.drawer-tabs span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-tabs button.active {
  border-color: rgba(39, 91, 220, .22);
  background: var(--blue-soft);
  color: var(--blue-ink);
}

.drawer-close:focus-visible,
.drawer-tabs button:focus-visible {
  outline: 2px solid rgba(90, 157, 226, .55);
  outline-offset: 2px;
}

.drawer-section-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  margin: 14px 0 8px;
}

.drawer-section-title:first-child {
  margin-top: 2px;
}

.drawer-section-title span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.drawer-section-title em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
}
.profile-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.profile-head > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 18px;
  font-weight: 900;
}
.profile-head strong {
  display: block;
  color: var(--nav);
  font-size: 16px;
  font-weight: 900;
}
.profile-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.profile-readonly-note {
  padding: 10px 11px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--nav);
  font-size: 12px;
  line-height: 1.55;
}
.profile-action {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  border: 1px solid rgba(216, 58, 58, 0.28);
  border-radius: 12px;
  background: var(--red);
  color: var(--white);
  font-size: 14px;
  font-weight: 900;
}
.profile-action.ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--nav);
}
.bottom-tab {
  min-height: 48px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.bottom-tab svg { width: 20px; height: 20px; }
.bottom-tab.active { background: var(--blue-soft); color: var(--blue-ink); }
.empty { padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }
.empty-state {
  display: grid;
  gap: 6px;
}
.empty-state strong,
.empty-state-inline strong {
  color: var(--nav);
  font-size: 15px;
  font-weight: 900;
}
.empty-state span,
.empty-state-inline span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}
.empty-state-inline {
  display: grid;
  gap: 4px;
  padding: 18px 12px;
}
.scope-lock-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-left: 4px solid var(--blue);
}
.scope-lock-card strong {
  display: block;
  color: var(--nav);
  font-size: 16px;
  font-weight: 900;
}
.scope-lock-card p {
  margin: 6px 0 4px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}
.scope-lock-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.scope-lock-card em {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
[hidden] { display: none !important; }
.link-btn {
  min-height: 42px;
  border: 1px solid rgba(39, 91, 220, 0.18);
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-weight: 900;
}
.metric-grid.one { grid-template-columns: minmax(0, 1fr); }
.metric-card small { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 800; }
.risk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.risk-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}
.risk-gauge {
  position: relative;
  display: grid;
  grid-template-columns: 44fr 23fr 33fr;
  height: 8px;
  overflow: visible;
  margin: 12px 0 9px;
  border-radius: 999px;
}
.risk-gauge span:first-child { border-radius: 999px 0 0 999px; }
.risk-gauge span:nth-child(3) { border-radius: 0 999px 999px 0; }
.risk-gauge .g { background: var(--green-soft); }
.risk-gauge .a { background: var(--orange-soft); }
.risk-gauge .r { background: var(--red-soft); }
.risk-gauge i {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: var(--nav);
}
.price-line {
  position: relative;
  height: 8px;
  margin: 12px 0 9px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: var(--green-soft);
}
.price-line b {
  position: absolute;
  top: -5px;
  bottom: -5px;
  left: 45%;
  width: 2px;
  background: var(--red);
}
.price-line i {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--nav);
  transform: translate(-50%, -50%);
  box-shadow: var(--shadow-soft);
}
.tap-card {
  min-height: 76px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(39, 91, 220, 0.22);
  border-radius: 8px;
  background: var(--white);
  padding: 14px;
  color: var(--nav);
  box-shadow: var(--shadow-soft);
}
.tap-card:hover { background: var(--blue-soft); }
.tap-card.summary-card {
  grid-template-columns: 40px minmax(0, 1fr);
  cursor: default;
}
.tap-card.summary-card:hover { background: var(--white); }
.tap-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.tap-card > span { color: var(--blue-ink); font-size: 24px; font-weight: 900; }
.tap-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--nav);
  color: var(--white);
}
.month-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 10px;
  padding-bottom: 2px;
}
.month-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid rgba(39, 91, 220, 0.22);
  border-radius: 10px;
  background: var(--white);
  color: var(--muted);
  padding: 0 14px;
  font-weight: 900;
}
.month-tabs button.active {
  background: var(--blue);
  color: var(--white);
}
.monthly-row {
  display: grid;
  grid-template-columns: 86px repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.monthly-row:last-child { border-bottom: 0; }
.monthly-row strong { color: var(--nav); font-size: 13px; }
.monthly-row .progress {
  grid-column: 1 / -1;
  margin: 0;
}
.monthly-row.planning-target-row {
  grid-template-columns: 86px minmax(0, 1fr) auto;
}
.planning-target-row em {
  color: var(--blue-ink);
  font-style: normal;
  font-weight: 700;
}

.monthly-row.planning-distribution-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
}

.monthly-row.planning-distribution-row.is-peak {
  margin: 0 -8px;
  padding-right: 8px;
  padding-left: 8px;
  border-radius: 7px;
  background: var(--blue-soft);
}

.trend-month,
.trend-value {
  min-width: 0;
}

.trend-month strong,
.trend-month small,
.trend-value strong,
.trend-value small {
  display: block;
}

.trend-month small,
.trend-value small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.trend-value {
  text-align: right;
}

.trend-value strong {
  color: var(--blue-ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 360px) {
  .planning-analysis-row b {
    max-width: 104px;
  }

  .trend-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trend-summary span:last-child {
    grid-column: 1 / -1;
  }
}

.policy-card { display: grid; gap: 12px; }
.policy-item {
  border-bottom: 1px dashed var(--line);
  padding-bottom: 12px;
}
.policy-item:last-child { border-bottom: 0; padding-bottom: 0; }
.policy-item p {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}
.policy-internal {
  border-left: 3px solid var(--orange);
  padding-left: 9px;
  color: var(--orange) !important;
  font-weight: 800;
}

@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

@media (min-width: 768px) {
  .page { width: min(900px, 100%); padding-left: 24px; padding-right: 24px; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric-grid.four-yoy { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .risk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid:not(.four) .metric-card:last-child:nth-child(odd) { grid-column: auto; }
  .county-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .county-list .big-card { margin-bottom: 0; }
}

@media (max-width: 560px) {
  .top-nav {
    align-items: center;
  }
  .nav-actions {
    gap: 7px;
  }
  .notice-bell {
    width: 36px;
    height: 36px;
  }
  .filter-grid {
    grid-template-columns: 1fr;
  }
  .filter-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 374px) {
  .page { padding-left: 11px; padding-right: 11px; }
  .hero-panel, .big-card { border-radius: 8px; }
  .hero-head h1 { font-size: 21px; }
  .hero-stats.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid, .metric-grid.four, .metric-grid.four-yoy, .pool-row { gap: 7px; }
  .metric-card { padding-left: 10px; padding-right: 10px; }
  .metric-value { font-size: 22px; }
  .yoy-card .metric-value { font-size: 24px; }
  .hero-yoy-main { grid-template-columns: minmax(0, 1fr); }
  .hero-yoy-main strong { font-size: 24px; }
  .channel-health-row { grid-template-columns: minmax(0, 1fr); }
  .county-row-head { display: grid; }
  .cost-split-grid { grid-template-columns: minmax(0, 1fr); }
  .cost-pill-row { display: grid; }
}

/* Phase 2 mobile visual refresh, matched to the image-first reference. */
body {
  background: var(--bg);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.app-screen {
  min-height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  background: var(--bg);
}

.page {
  width: min(390px, 100%);
  padding: 10px 18px calc(86px + env(safe-area-inset-bottom));
}

.top-nav {
  min-height: 72px;
  padding: calc(12px + env(safe-area-inset-top)) 18px 10px;
  border-bottom: 0;
  background: rgba(243,246,251,.88);
  box-shadow: none;
}

.nav-scope {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.nav-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 20px;
  font-weight: 800;
}

.nav-actions {
  gap: 6px;
}

.nav-title {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-kicker {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.nav-right {
  color: var(--muted);
  font-size: 11px;
}

.nav-right strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.header-help,
.notice-bell {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-ink);
}

.header-help svg,
.notice-bell svg {
  width: 18px;
  height: 18px;
}

.notice-bell i {
  border-color: var(--bg);
  background: var(--red);
}

.section-title {
  gap: 8px;
  margin: 16px 2px 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.section-title::before {
  content: "";
  display: block;
  width: 4px;
  height: 16px;
  border-radius: 3px;
  background: var(--blue);
}

.section-title::after {
  display: none;
}

.hero-panel,
.big-card,
.metric-card,
.risk-card,
.tap-card,
.pw-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 19px 20px 17px;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--surface) 100%);
}

.hero-head {
  margin-bottom: 10px;
}

.eyebrow {
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 700;
}

.hero-head h1 {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
}

.hero-pill,
.hero-back,
.bc-tag,
.chip,
.status-tag {
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-weight: 700;
}

.period-eyebrow {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.hero-yoy-main {
  display: block;
  margin: 16px 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.hero-primary span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.hero-primary strong {
  display: block;
  color: var(--blue-ink);
  font-size: 56px;
  line-height: .94;
  font-weight: 700;
  letter-spacing: 0;
}

.hero-primary small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.hero-progress {
  height: 7px;
  margin: 15px 0 12px;
  overflow: hidden;
  border-radius: 7px;
  background: var(--line2);
}

.hero-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #275BDC, #1E46A5);
}

.hero-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.hero-meta-row span + span {
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.hero-meta-row b {
  display: inline-block;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}
.hero-meta-row b:not([class*="yoy-tone-"]) { color: var(--blue-ink); }

.hero-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-stat {
  padding: 11px 10px 10px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 14px;
  background: var(--white);
}

.hero-stat span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.status-dot.green { background: var(--green); }
.status-dot.orange { background: var(--orange); }
.status-dot.red { background: var(--red); }
.status-dot.gray { background: var(--ink3); }

.hero-stat strong {
  margin: 7px 0 2px;
  font-size: 28px;
  font-weight: 700;
}

.hero-stat small {
  color: var(--ink3);
  font-size: 11px;
  font-weight: 500;
}

.metric-grid {
  gap: 10px;
}

.metric-card {
  min-height: 104px;
  padding: 14px;
  border-left-width: 3px;
  border-radius: 16px;
}

.metric-label,
.metric-sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.metric-value {
  color: var(--blue-ink);
  font-size: 28px;
  font-weight: 700;
}

.process-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 15px 4px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.process-cell {
  min-width: 0;
  text-align: center;
}

.process-cell + .process-cell {
  border-left: 1px solid var(--line);
}

.process-cell span,
.process-cell small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.process-cell strong {
  display: block;
  margin: 6px 0 5px;
  color: var(--blue-ink);
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.risk-card {
  padding: 17px 18px 16px;
  border-left-width: 1px;
}

.risk-scale-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.risk-scale-head span {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.risk-scale-head strong {
  display: block;
  margin-top: 6px;
  font-size: 34px;
  line-height: 1;
  font-weight: 700;
}

.pill-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.pill-soft.green,
.status-tag.tag-green { background: var(--green-soft); color: var(--green); }
.pill-soft.orange,
.status-tag.tag-orange { background: var(--orange-soft); color: var(--orange); }
.pill-soft.red,
.status-tag.tag-red { background: var(--red-soft); color: var(--red); }
.pill-soft.gray,
.status-tag.tag-gray { background: var(--line2); color: var(--muted); }

.risk-gauge {
  grid-template-columns: 50fr 25fr 25fr;
  height: 10px;
  gap: 3px;
  margin: 16px 0 8px;
  border-radius: 4px;
}

.risk-gauge .g,
.risk-gauge .a,
.risk-gauge .r {
  border-radius: 4px;
}

.risk-gauge i {
  top: -5px;
  width: 3px;
  height: 20px;
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--white);
}

.risk-axis {
  display: flex;
  justify-content: space-between;
  color: var(--ink3);
  font-size: 11px;
}

.risk-lite-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line2);
  color: var(--muted);
  font-size: 13px;
}

.risk-lite-row strong {
  color: var(--ink);
  font-size: 17px;
}

.cost-overview-card {
  margin-bottom: 12px;
  padding: 17px 18px 18px;
  border: 1px solid #D8E1EE;
  border-radius: 18px;
  background: var(--expense-bg);
  box-shadow: var(--shadow);
}

.cost-overview-card .bc-header h2 {
  color: var(--blue-ink);
  font-size: 16px;
  font-weight: 700;
}

.cost-overview-card .bc-tag {
  border: 1px solid #D8E1EE;
  background: var(--white);
}

.cost-split-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 12px 0 10px;
}

.cost-split-grid div {
  padding: 0 9px;
  border-radius: 0;
  background: transparent;
  border-left: 1px solid #D8E1EE;
}

.cost-split-grid div:first-child {
  border-left: 0;
  padding-left: 0;
}

.cost-split-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.cost-split-grid strong {
  margin-top: 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.tap-card {
  min-height: 76px;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  border-radius: 16px;
  border-color: var(--line);
  color: var(--ink);
}

.tap-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue-ink);
}

.tap-card > span {
  color: var(--ink3);
}

.tap-card:hover {
  background: var(--white);
}

.county-filter-card {
  position: static;
  padding: 13px;
  border-radius: 16px;
}

.filter-grid {
  grid-template-columns: 1fr;
}

.filter-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filter-actions button,
.link-btn {
  border-color: #D8E1EE;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-weight: 700;
}

.chip {
  min-height: 34px;
  border-color: var(--line);
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
}

.chip.active {
  border-color: #D8E1EE;
  background: var(--blue-soft);
  color: var(--blue-ink);
}

.county-list {
  display: grid;
  gap: 10px;
}

.county-row {
  display: grid;
  grid-template-columns: 4px minmax(96px, 1fr) minmax(132px, 1.08fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.county-risk-reasons { grid-column: 2 / -1; }

.county-status-bar {
  align-self: stretch;
  width: 4px;
  border-radius: 4px;
  background: var(--blue);
}

.county-status-bar.green { background: var(--green); }
.county-status-bar.orange { background: var(--orange); }
.county-status-bar.red { background: var(--red); }
.county-status-bar.gray { background: var(--ink3); }

.county-main {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.county-rank {
  display: none;
}

.county-row h3 {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.county-row p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.mini-yoy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 0;
  border: 0;
}

.mini-yoy {
  white-space: normal;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.mini-yoy b {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.status-tag {
  min-height: 27px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
}

.bottom-nav {
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 430px;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 7px 8px max(7px, env(safe-area-inset-bottom));
  border-width: 1px 0 0;
  border-color: var(--line);
  border-radius: 0;
  /* 不透明底色：0.94 的半透明会让下方数字透出来压在 tab 文字上。 */
  background: var(--bg);
  box-shadow: 0 -6px 16px rgba(18, 32, 58, 0.06);
}

.bottom-tab {
  min-height: 52px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.bottom-tab.active {
  background: transparent;
  color: var(--blue-ink);
  font-weight: 700;
}

.bottom-tab svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}

.pool-card {
  border-radius: 16px;
}

.county-cost-card {
  border-left-width: 1px;
}

.activity-item,
.notice-item,
.terminal-item {
  border-bottom-color: var(--line2);
}

.notice-card {
  border-left-width: 1px;
  background: var(--white);
}

.profile-head > span {
  background: var(--blue-soft);
  color: var(--blue-ink);
}

.profile-action {
  background: var(--red);
}

.hero-panel,
.metric-card,
.process-band,
.risk-card,
.cost-overview-card,
.tap-card,
.county-filter-card,
.county-row,
.pool-card,
.big-card,
.profile-panel,
.pw-card {
  border-radius: 8px;
}

.overview-hero {
  border-color: rgba(39, 91, 220, .12);
}

.hero-pill.neutral {
  background: var(--surface);
  color: var(--muted);
}

.next-focus {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: #F8FAFC;
}

.next-focus span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.next-focus strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 650;
}

.hero-stats.compact-status {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.hero-stats.compact-status .hero-stat {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.hero-stats.compact-status .hero-stat + .hero-stat {
  border-left: 1px solid var(--line);
}

.county-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 116px), 1fr));
  gap: 6px;
  min-width: 0;
}

.county-metrics-row span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.county-metrics-row b {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 650;
  white-space: normal;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.county-metrics-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.15;
  font-weight: 500;
}

.county-row {
  min-height: 76px;
  box-shadow: 0 1px 2px rgba(18,32,58,.035);
}

.cost-split-grid div {
  min-height: 42px;
}

.bottom-tab {
  border-radius: 8px;
}

@media (min-width: 520px) {
  body {
    min-height: 100dvh;
    background: #ECEFF1;
  }

  .app-screen {
    margin: 18px auto;
    min-height: calc(100dvh - 36px);
    border: 1px solid rgba(18, 32, 58,.08);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 40px 80px -52px rgba(18, 32, 58,.45);
  }

  .bottom-nav {
    max-width: 430px;
  }
}

@media (min-width: 768px) {
  .page {
    width: min(390px, 100%);
    padding-left: 18px;
    padding-right: 18px;
  }

  .metric-grid,
  .metric-grid.four,
  .metric-grid.four-yoy,
  .risk-grid,
  .county-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 430px) {
  .page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-primary strong {
    font-size: 50px;
  }

  .cost-split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .cost-split-grid div {
    border-left: 0;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255,255,255,.58);
  }

  .county-row {
    grid-template-columns: 4px minmax(0, 1fr);
  }

  .county-row .county-metrics-row {
    grid-column: 2 / -1;
  }

  .county-row .status-tag {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

.app-screen,
.top-nav,
.bottom-nav {
  color: var(--ink);
}

.overview-hero .hero-primary strong,
.overview-hero .hero-meta-row b:not([class*="yoy-tone-"]),
.metric-value,
.process-cell strong,
.cost-overview-card .bc-header h2,
.cost-split-grid strong,
.hero-stats.compact-status .hero-stat strong {
  color: var(--ink);
}

.overview-hero .hero-primary span,
.section-title,
.bc-header h2,
.policy-manual-head strong,
.progress-row strong {
  color: var(--ink);
}

.hero-progress i,
.fill.blue,
.bottom-tab.active {
  background: var(--blue);
}

.hero-panel,
.big-card,
.metric-card,
.risk-card,
.tap-card,
.process-band,
.cost-overview-card,
.county-filter-card,
.county-row,
.pool-card,
.profile-panel,
.pw-card {
  border-color: rgba(218, 221, 226, 0.88);
  background: var(--white);
  box-shadow: var(--shadow);
}

.overview-hero {
  padding: 17px 18px 16px;
  background: var(--white);
}

.overview-hero .next-focus {
  display: none;
}

.hero-primary strong {
  font-size: 46px;
  letter-spacing: 0;
}

.hero-meta-row b {
  font-size: 18px;
}

.hero-stats.compact-status {
  border-color: var(--line);
  background: var(--white);
}

.hero-stats.compact-status .hero-stat {
  background: var(--white);
}

.process-metric-band {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.process-metric-cell {
  display: grid;
  min-width: 0;
  min-height: 118px;
  padding: 12px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  text-align: left;
  box-shadow: var(--shadow);
}

.process-metric-cell + .process-metric-cell {
  border-left: 1px solid var(--line);
}

.process-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-ink);
}

.process-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.process-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.process-value-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  align-items: start;
  margin: 6px 0 4px;
  min-width: 0;
}

.process-metric-cell strong {
  min-width: 0;
  margin: 0;
  overflow: visible;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.08;
  font-weight: 750;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.process-value-row .yoy-chip {
  justify-self: start;
  max-width: 100%;
  padding-right: 6px;
  padding-left: 6px;
  font-size: 11px;
}

.process-metric-cell small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.process-metric-cell .progress {
  height: 5px;
  margin-top: 9px;
}

.process-placeholder {
  margin-top: 9px;
  color: var(--ink3);
  font-size: 11px;
  line-height: 1.25;
}

.risk-card {
  background: var(--white);
}

.risk-lite-row strong,
.risk-scale-head strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.cost-overview-card {
  background: var(--white);
}

.cost-split-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cost-split-grid div {
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: var(--surface);
}

.cost-split-grid div:first-child {
  padding-left: 10px;
}

.scope-shortcuts .chip-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: visible;
}

.scope-shortcuts .chip {
  justify-content: space-between;
  min-height: 38px;
}

.overview-progress-card {
  padding: 12px 13px;
}

.overview-progress-card .bc-tag {
  background: transparent;
  color: var(--muted);
}

.progress-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line2);
  background: transparent;
  text-align: left;
}

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

.progress-row span,
.progress-row small {
  min-width: 0;
}

.progress-row strong,
.progress-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.progress-row b {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.drawer-summary-card {
  display: grid;
  gap: 11px;
}

.action-hub-card {
  display: grid;
  gap: 12px;
}

.action-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.action-hub-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-tile {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  min-width: 0;
  min-height: 74px;
  padding: 11px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: #FFFFFF;
  color: inherit;
  text-align: left;
}

.action-tile-primary {
  grid-column: 1 / -1;
  min-height: 82px;
  border-color: rgba(39, 91, 220, .22);
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}

.action-tile i {
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-style: normal;
}

.action-tile svg {
  width: 18px;
  height: 18px;
}

.action-tile strong,
.action-tile span,
.action-tile em {
  min-width: 0;
}

.action-tile strong {
  overflow: visible;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: clip;
  overflow-wrap: break-word;
  word-break: normal;
  white-space: normal;
}

.action-tile span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.action-tile em {
  overflow-wrap: anywhere;
  color: var(--blue-ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.4;
}

.action-tile:active,
.action-tile:focus-visible {
  border-color: rgba(39, 91, 220, .28);
  background: var(--blue-soft);
  outline: none;
}

.drawer-summary-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.drawer-launch {
  width: 100%;
  border: 1px solid rgba(39, 91, 220, .18);
  background: #FFFFFF;
  color: var(--blue-ink);
}

.drawer-preview-list,
.drawer-table {
  display: grid;
  gap: 9px;
}

.drawer-preview-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: var(--surface);
}

.drawer-preview-row strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.drawer-preview-row span,
.drawer-preview-row small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-preview-row em {
  color: var(--blue-ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.drawer-list-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FFFFFF;
}

.terminal-plan-summary .metric-card {
  min-height: 94px;
}

.terminal-source-note {
  display: grid;
  gap: 3px;
  margin: 10px 0 16px;
  padding: 11px 12px;
  border: 1px solid rgba(39, 91, 220, .18);
  border-radius: 8px;
  background: var(--blue-soft);
}

.terminal-source-note.has-gap {
  border-color: rgba(219, 142, 23, .28);
  background: #FFF9ED;
}

.terminal-source-note strong {
  color: var(--ink);
  font-size: 13px;
}

.terminal-source-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.terminal-plan-list {
  display: grid;
  gap: 8px;
}

.terminal-plan-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FFFFFF;
}

.terminal-plan-item summary {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 14px;
  gap: 8px;
  align-items: center;
  min-height: 62px;
  padding: 9px 10px;
  cursor: pointer;
  list-style: none;
}

.terminal-plan-item summary::-webkit-details-marker { display: none; }

.terminal-plan-item summary::after {
  content: '›';
  color: var(--blue-ink);
  font-size: 20px;
  line-height: 1;
  transition: transform .16s ease;
}

.terminal-plan-item[open] summary::after { transform: rotate(90deg); }

.terminal-plan-rank {
  color: var(--ink3);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.terminal-plan-main {
  min-width: 0;
}

.terminal-plan-main strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.terminal-plan-main small,
.terminal-plan-total small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.terminal-plan-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-plan-total {
  min-width: 58px;
  text-align: right;
  white-space: nowrap;
}

.terminal-plan-total strong {
  color: var(--blue-ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.terminal-month-list {
  padding: 4px 10px 8px 46px;
  border-top: 1px solid var(--line2);
  background: var(--surface);
}

.terminal-month-row {
  display: grid;
  grid-template-columns: 72px repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line2);
  color: var(--muted);
  font-size: 11px;
}

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

.terminal-month-row strong {
  color: var(--ink);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 360px) {
  .terminal-plan-item summary {
    grid-template-columns: 24px minmax(0, 1fr) auto 12px;
    gap: 6px;
    padding-right: 8px;
  }

  .terminal-month-list { padding-left: 40px; }
  .terminal-month-row { grid-template-columns: 68px minmax(0, 1fr); }
  .terminal-month-row span:last-child { grid-column: 2; }
}

.policy-manual-card {
  display: grid;
  gap: 13px;
}

.faq-card {
  display: grid;
  gap: 12px;
}

.faq-form {
  display: grid;
  gap: 7px;
}

.faq-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.faq-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  gap: 8px;
}

.faq-input-row input {
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  outline: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-size: 14px;
}

.faq-input-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(39, 91, 220, .12);
}

.faq-input-row button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--blue-ink);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
}

.faq-answer {
  padding: 11px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: var(--surface);
}

.faq-answer.missed {
  border-color: rgba(39, 91, 220, .24);
  background: var(--blue-soft);
}

.faq-answer strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.faq-answer p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.58;
}

.faq-boundary {
  padding: 9px 10px;
  border: 1px solid rgba(39, 91, 220, .18);
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.policy-manual-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.policy-manual-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.policy-manual-group {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: var(--surface);
}

.policy-manual-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 14px;
  gap: 11px;
  align-items: center;
  width: 100%;
  min-height: 60px;
  padding: 8px 12px;
  border-top: 1px solid var(--line2);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.policy-manual-row:first-child {
  border-top: 0;
}

.policy-manual-row i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.policy-manual-row > span {
  min-width: 0;
}

.policy-manual-row strong,
.policy-manual-row small {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
}

.policy-manual-row strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.policy-manual-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.policy-manual-row em {
  justify-self: end;
  color: var(--muted);
  font-style: normal;
  font-size: 16px;
}

.policy-manual-row:active,
.policy-manual-row:focus-visible {
  background: #EEF1F6;
  outline: none;
}

.policy-open-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.policy-open-item span {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.policy-open-item span em {
  flex: none;
  color: var(--blue-ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.manual-detail-page {
  display: grid;
  gap: 12px;
  padding-bottom: 18px;
}

.drawer-manual-page {
  gap: 10px;
  padding-bottom: 0;
}

.manual-back-link {
  justify-self: start;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.manual-detail-hero,
.manual-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.manual-detail-hero {
  padding: 18px;
}

.manual-detail-hero > span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 750;
}

.manual-detail-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.22;
  letter-spacing: 0;
}

.manual-detail-hero p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.manual-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.manual-meta-grid div {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: var(--surface);
}

.manual-meta-grid small,
.manual-meta-grid strong {
  display: block;
}

.manual-meta-grid small {
  color: var(--muted);
  font-size: 11px;
}

.manual-meta-grid strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.manual-detail-card {
  padding: 15px;
}

.drawer-body .manual-detail-hero,
.drawer-body .manual-detail-card {
  box-shadow: none;
}

.drawer-body .manual-detail-hero {
  padding: 15px;
}

.drawer-body .manual-detail-hero h1 {
  font-size: 19px;
}

.drawer-body .manual-meta-grid {
  margin-top: 12px;
}

.manual-detail-card h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.3;
}

.manual-detail-card ul,
.manual-step-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.manual-detail-card li,
.manual-faq-list p {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
}

.manual-detail-card li {
  position: relative;
  padding-left: 16px;
}

.manual-detail-card ul li::before {
  position: absolute;
  top: 9px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--blue);
  content: "";
}

.manual-step-list li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 0;
}

.manual-step-list span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 800;
}

.manual-step-list p {
  margin: 1px 0 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
}

.manual-faq-list {
  display: grid;
  gap: 10px;
}

.manual-faq-list div {
  padding: 11px;
  border-radius: 8px;
  background: var(--surface);
}

.manual-faq-list strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.manual-faq-list p {
  margin: 5px 0 0;
}

.drawer-manual-page { gap: 12px; }
.manual-back-link { min-height: 44px; border-radius: 8px; cursor: pointer; }

.manual-overview {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: linear-gradient(135deg, #FFFFFF 0%, var(--blue-soft) 100%);
}

.manual-overview-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--blue-ink);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 800;
}

.manual-overview small, .manual-overview h1, .manual-overview p { display: block; margin: 0; }
.manual-overview small { color: var(--blue-ink); font-size: 11px; font-weight: 750; }
.manual-overview h1 { margin-top: 4px; color: var(--ink); font-size: 19px; line-height: 1.28; }
.manual-overview p { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.48; }

.manual-scene-note,
.manual-access-note,
.manual-media-note {
  padding: 11px 12px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.manual-scene-note strong, .manual-scene-note span { display: block; }
.manual-scene-note strong { color: var(--blue-ink); }
.manual-scene-note span { margin-top: 3px; }

.manual-state {
  display: grid;
  gap: 7px; min-height: 132px; place-content: center;
  padding: 20px;
  border: 1px solid var(--line2);
  border-radius: 10px; background: var(--surface); text-align: center;
}

.manual-state strong { color: var(--ink); font-size: 15px; }
.manual-state p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.manual-state button { min-height: 44px; margin-top: 5px; border: 0; border-radius: 8px; background: var(--blue-ink); color: #FFFFFF; font-weight: 750; }

.manual-state-skeleton { display: grid; gap: 6px; width: min(220px, 65vw); margin: 0 auto 4px; }
.manual-state-skeleton i { height: 9px; border-radius: 999px; background: var(--line2); }

.manual-state-skeleton i:nth-child(2) { width: 78%; }
.manual-state-skeleton i:nth-child(3) { width: 54%; }

.manual-accordion {
  overflow: hidden;
  border: 1px solid var(--line2);
  border-radius: 9px; background: #FFFFFF;
}

.manual-accordion > summary {
  display: flex;
  align-items: center; justify-content: space-between;
  min-height: 54px;
  padding: 9px 12px; cursor: pointer; list-style: none;
}

.manual-accordion > summary::-webkit-details-marker { display: none; }

.manual-accordion > summary span, .manual-accordion > summary strong, .manual-accordion > summary small { display: block; }
.manual-accordion > summary strong { color: var(--ink); font-size: 14px; }
.manual-accordion > summary small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.manual-accordion > summary i { color: var(--muted); font-size: 20px; font-style: normal; transition: transform .16s ease; }

.manual-accordion[open] > summary i { transform: rotate(90deg); }
.manual-accordion-body { padding: 12px; border-top: 1px solid var(--line2); }
.manual-kv-list, .manual-voucher-list, .manual-template-list { display: grid; gap: 9px; }

.manual-kv-list > div {
  display: grid;
  grid-template-columns: minmax(80px, .7fr) minmax(0, 1.3fr);
  gap: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--line2);
}

.manual-kv-list > div:last-child { padding-bottom: 0; border-bottom: 0; }
.manual-kv-list span { color: var(--muted); font-size: 12px; }

.manual-kv-list strong { color: var(--ink); font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }

.manual-step-list li > div { min-width: 0; }

.manual-step-list li > div strong { color: var(--ink); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }

.manual-more { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line2); }
.manual-more > summary { min-height: 44px; color: var(--blue-ink); font-size: 12px; font-weight: 750; cursor: pointer; }

.manual-more > .manual-step-list { margin-top: 8px; }
.manual-back-link:focus-visible, .manual-accordion > summary:focus-visible, .manual-more > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.manual-voucher-list > div { padding: 11px; border-radius: 8px; background: var(--surface); }
.manual-voucher-list strong, .manual-voucher-list p, .manual-voucher-list small { display: block; }
.manual-voucher-list strong { color: var(--ink); font-size: 13px; }
.manual-voucher-list p { margin: 5px 0; color: var(--ink); font-size: 12.5px; line-height: 1.5; }
.manual-voucher-list small { margin-top: 3px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }

.manual-template-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px; align-items: center;
  padding: 11px;
  border: 1px solid var(--line2);
  border-radius: 8px; background: var(--surface);
}

.manual-template-row span, .manual-template-row strong, .manual-template-row small { display: block; min-width: 0; }
.manual-template-row strong { color: var(--ink); font-size: 13px; line-height: 1.4; }
.manual-template-row small { margin-top: 4px; color: var(--blue-ink); font-size: 11.5px; line-height: 1.4; }

.manual-template-row em { padding: 5px 7px; border-radius: 6px; background: #EEF1F6; color: var(--muted); font-size: 11px; font-style: normal; white-space: nowrap; }
.manual-asset-item button, .manual-asset-item a { min-height: 44px; padding: 10px; color: var(--blue-ink); }
.manual-asset-item button:disabled { opacity: .6; }
.manual-asset-item p { margin: 6px 0; font-size: 12px; overflow-wrap: anywhere; }
.manual-asset-item img { display: block; max-width: 100%; height: auto; }

@media (max-width: 340px) {
  .manual-overview { grid-template-columns: 38px minmax(0, 1fr); }
  .manual-overview-icon { width: 38px; height: 38px; }
  .manual-template-row { grid-template-columns: minmax(0, 1fr); }
  .manual-template-row em { justify-self: start; }
}

@media (min-width: 768px) {
  .process-metric-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.bottom-tab.active {
  background: transparent;
  color: var(--blue-ink);
}

.process-metric-cell strong {
  font-size: 17px;
  white-space: nowrap;
}

/* Mobile type tuning: keep backend colors, adapt reading density for QR H5. */
body {
  line-height: 1.52;
  text-rendering: optimizeLegibility;
}

.nav-title {
  font-size: 16px;
  line-height: 1.22;
  font-weight: 700;
}

.nav-kicker {
  font-size: 11.5px;
  line-height: 1.35;
}

.nav-right {
  font-size: 11px;
  line-height: 1.25;
}

.nav-right strong {
  font-size: 12px;
  line-height: 1.2;
}

.section-title {
  font-size: 15px;
  line-height: 1.28;
  font-weight: 700;
}

.eyebrow {
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
}

.hero-head h1 {
  font-size: 24px;
  line-height: 1.18;
  font-weight: 700;
}

.period-eyebrow,
.county-meta span {
  font-size: 12.5px;
  line-height: 1.48;
  font-weight: 600;
}

.hero-primary span,
.county-sales-head span,
.metric-label,
.metric-sub,
.process-label {
  font-size: 12.5px;
  line-height: 1.36;
  font-weight: 600;
}

.hero-primary strong {
  font-size: 48px;
  line-height: .98;
  font-weight: 700;
}

.hero-primary small,
.hero-meta-row,
.hero-stat span,
.hero-stat small,
.process-metric-cell small,
.drawer-summary-copy,
.action-tile span,
.policy-manual-head p,
.faq-answer p,
.manual-detail-hero p,
.manual-detail-card li,
.manual-step-list p,
.manual-faq-list p {
  line-height: 1.55;
}

.hero-meta-row b {
  font-size: 18px;
  line-height: 1.1;
  font-weight: 700;
}

.hero-stat strong {
  font-size: 25px;
  line-height: 1.06;
  font-weight: 700;
}

.county-sales-main strong {
  font-size: 38px;
  line-height: 1;
  font-weight: 700;
}

.county-sales-main small {
  font-size: 15px;
  font-weight: 700;
}

.process-metric-cell strong,
.metric-value {
  font-size: 25px;
  line-height: 1.08;
  font-weight: 700;
}

.county-process-mini strong {
  font-size: 17px;
  line-height: 1.14;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
}

.process-metric-cell strong {
  font-size: 17px;
  line-height: 1.14;
  white-space: normal;
  overflow-wrap: anywhere;
}

.bc-header h2,
.sticky-summary strong,
.notice-item strong,
.activity-item strong,
.policy-manual-head strong,
.manual-detail-card h2 {
  font-size: 16px;
  line-height: 1.32;
  font-weight: 700;
}

.tap-card p,
.notice-item p,
.activity-item p,
.profile-readonly-note,
.empty-state span,
.scope-lock-card p {
  font-size: 13.5px;
  line-height: 1.62;
}

.action-tile strong,
.drawer-preview-row strong,
.policy-manual-row strong,
.manual-faq-list strong {
  font-size: 13.5px;
  line-height: 1.34;
  font-weight: 700;
}

.action-tile em,
.drawer-preview-row em,
.policy-open-item span em {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 750;
}

.bottom-tab {
  font-size: 11.5px;
  line-height: 1.2;
}

@media (max-width: 374px) {
  .hero-head h1 {
    font-size: 22px;
  }

  .hero-primary strong {
    font-size: 44px;
  }

  .county-sales-main strong {
    font-size: 34px;
  }

  .metric-value {
    font-size: 23px;
  }

  .process-metric-cell strong {
    font-size: 15px;
  }

  .county-process-mini strong {
    font-size: 15px;
  }
}

/* Activity-first mobile layout: one summary, one task stream, no repeated metric cards. */
.county-hero {
  gap: 10px;
  padding: 16px;
}

.county-hero .hero-head {
  margin-bottom: 2px;
}

.county-meta {
  flex-wrap: wrap;
  gap: 4px 0;
  overflow: visible;
  margin: 0;
  padding: 0;
}

.county-meta span {
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1.45;
}

.county-meta span:not(:last-child)::after {
  margin: 0 7px;
  color: var(--ink3);
  content: "·";
}

.county-hero .period-eyebrow {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line2);
}

.county-hero .county-sales-card {
  gap: 10px;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--line2);
  border-radius: 0;
  background: transparent;
}

.county-sales-main {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
  overflow: visible;
}

.county-sales-main > div {
  display: grid;
  gap: 4px;
  justify-items: start;
  text-align: left;
}

.county-sales-main > div + div {
  padding-left: 16px;
  border-left: 1px solid var(--line2);
}

.county-sales-main .county-sales-rate strong {
  overflow: visible;
  color: var(--blue-ink);
  font-size: 34px;
  line-height: 1;
}

.county-sales-card.is-planning .county-sales-rate strong {
  font-size: 30px;
}

.county-sales-main .county-sales-volume strong {
  overflow: visible;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.05;
}

.county-sales-main .county-sales-volume small {
  font-size: 13px;
}

.county-sales-main span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 650;
}

.county-sales-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.county-core-empty,
.hero-metric-empty {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.county-core-empty strong,
.hero-metric-empty strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.county-core-empty span,
.hero-metric-empty span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.hero-metric-empty {
  margin-top: 13px;
}

.repayment-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-items: center;
  padding-top: 11px;
  border-top: 1px solid var(--line2);
}

.repayment-summary span,
.repayment-summary em {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  font-style: normal;
}

.repayment-summary .repayment-yoy {
  grid-column: 1 / -1;
}

.repayment-summary strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--ink);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.county-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /* 标签 / 数值 / 脚注三行由外层统一定高，三列才能真正共用基线。 */
  grid-template-rows: auto auto auto;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--line2);
}

.county-kpi-item {
  /* 继承外层行高：窄屏下某一列数值换行，不会把相邻列的脚注顶歪。 */
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  gap: 4px;
  min-width: 0;
  padding: 0 10px;
}

.county-kpi-item:first-child {
  padding-left: 0;
}

.county-kpi-item:last-child {
  padding-right: 0;
}

.county-kpi-item + .county-kpi-item {
  border-left: 1px solid var(--line2);
}

.county-kpi-item span,
.county-kpi-item small {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.3;
}

.county-kpi-item strong {
  min-width: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.county-detail-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  margin: 2px -16px -16px;
  border: 0;
  border-top: 1px solid var(--line2);
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 13px;
  font-weight: 750;
}

.county-detail-cta svg {
  width: 15px;
  height: 15px;
}

.activity-execution-card,
.process-list-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.activity-execution-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line2);
}

.activity-execution-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.activity-execution-head strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.activity-execution-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.activity-execution-head > em,
.record-state {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 11px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 750;
}

.activity-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 11px 8px;
  border-bottom: 1px solid var(--line2);
  background: var(--surface);
}

.activity-summary-grid > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 0 7px;
}

.activity-summary-grid > div + div {
  border-left: 1px solid var(--line);
}

.activity-summary-grid span {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.25;
}

.activity-summary-grid strong {
  min-width: 0;
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.activity-summary-grid strong:not([class*="yoy-tone-"]) { color: var(--ink); }

.activity-execution-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line2);
}

.activity-execution-row > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.activity-execution-row strong,
.activity-execution-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.activity-execution-row strong {
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.35;
}

.activity-execution-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.activity-execution-row .progress {
  width: min(190px, 100%);
  height: 4px;
}

.activity-execution-card > .progress {
  width: auto;
  margin: 0 14px 12px;
}

.pool-card .progress {
  height: 4px;
  margin-top: 6px;
}

.record-state.gray {
  background: var(--notice);
  color: var(--muted);
}

.record-state.orange {
  background: var(--orange-soft);
  color: var(--orange);
}

.activity-detail-link {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: var(--surface);
  color: var(--blue-ink);
  font-size: 13px;
  font-weight: 750;
}

.focus-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.focus-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  padding: 10px 13px;
  border: 0;
  border-bottom: 1px solid var(--line2);
  background: var(--white);
  color: var(--ink);
  text-align: left;
}

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

.focus-row > i {
  align-self: stretch;
  border-radius: 3px;
  background: var(--blue);
}

.focus-row > i.orange {
  background: var(--orange);
}

.focus-row > i.red {
  background: var(--red);
}

.focus-row > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.focus-row strong,
.focus-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.focus-row strong {
  font-size: 13.5px;
  line-height: 1.35;
}

.focus-row small {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.focus-row svg {
  width: 15px;
  height: 15px;
  color: var(--blue-ink);
}

.focus-card-empty {
  display: grid;
  gap: 5px;
  padding: 14px;
}

.focus-card-empty strong {
  font-size: 14px;
}

.focus-card-empty span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.activity-plan-copy {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.planning-summary,
.fee-planning-note {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
}

.planning-summary > summary,
.fee-planning-note > summary {
  min-height: 32px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.planning-summary > summary:focus-visible,
.fee-planning-note > summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.planning-summary small,
.planning-summary-grid span,
.planning-summary-grid strong {
  display: block;
}

.planning-summary .indicator-yoy { font-size: 13px; font-weight: 700; }

.planning-summary small,
.planning-summary-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
}

.planning-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.planning-summary-grid strong {
  margin-top: 4px;
  font-size: 16px;
}

.indicator-summary {
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.indicator-summary > summary {
  position: relative;
  padding: 14px 24px 10px 0;
  list-style: none;
  font-size: 14px;
}

.indicator-summary > summary::-webkit-details-marker { display: none; }
.indicator-summary > summary::after {
  content: '';
  position: absolute;
  top: 20px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
}
.indicator-summary[open] > summary::after { transform: rotate(225deg); }
.indicator-summary small { font-size: 12px; }
.indicator-summary .planning-summary-grid { display: block; margin-top: 0; }
.indicator-summary .planning-summary-grid > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.indicator-summary .planning-summary-grid > div > span {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  margin-top: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.indicator-summary .planning-summary-grid strong {
  grid-column: 2;
  grid-row: 1;
  margin-top: 0;
  text-align: right;
  font-size: 21px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.indicator-summary .indicator-target { grid-column: 1; grid-row: 2; }
.indicator-summary .indicator-completion { grid-column: 1; grid-row: 3; }
.indicator-summary .indicator-yoy { grid-column: 2; grid-row: 2; text-align: right; }
.indicator-summary .indicator-offsite { grid-column: 2; grid-row: 3; text-align: right; }
.indicator-summary .indicator-note { grid-column: 1 / -1; }

.fee-planning-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.7;
}

.planning-pie-pending {
  color: var(--muted);
  font-size: 11px;
}

.chart-legend .legend-neutral {
  background: var(--muted);
}

.process-list-card {
  display: grid;
}

.process-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  min-width: 0;
  padding: 13px 14px;
  border-left: 3px solid var(--blue);
  border-bottom: 1px solid var(--line2);
}

.process-row:last-of-type {
  border-bottom: 0;
}

.process-row .process-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue-ink);
}

.process-row .process-icon svg {
  width: 17px;
  height: 17px;
}

.process-row-body {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.process-row-head,
.process-row-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.process-row-value strong {
  min-width: 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.1;
  font-weight: 700;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.process-row-value small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.process-row .progress {
  height: 4px;
}

.process-placeholder,
.metric-hidden-note,
.risk-pending {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.metric-hidden-note,
.risk-pending {
  padding: 9px 14px;
  background: var(--surface);
  text-align: center;
}

.risk-card-empty {
  border-left-color: var(--line);
}

.risk-card-empty .empty-state-inline {
  padding: 2px 0;
}

.activity-overview-empty,
.activity-fee-ready {
  display: grid;
  gap: 6px;
  padding: 15px;
}

.activity-overview-empty > strong,
.activity-fee-ready > strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.3;
}

.activity-overview-empty > span,
.activity-fee-ready > span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

@media (max-width: 374px) {
  .top-nav {
    gap: 8px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .nav-scope {
    gap: 8px;
  }

  .county-sales-main {
    gap: 12px;
  }

  .county-sales-main > div + div {
    padding-left: 12px;
  }

  .county-sales-main .county-sales-rate strong {
    font-size: 30px;
  }

  .county-sales-main .county-sales-volume strong {
    font-size: 22px;
  }

  .activity-execution-row {
    grid-template-columns: 1fr;
  }

  .record-state {
    justify-self: start;
  }
}

/* Third-phase planning uses value comparisons; completion bars remain execution-only. */
.top-nav {
  background: #FFFFFF;
}

.nav-cutoff {
  min-width: 82px;
  color: var(--nav);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}

.nav-cutoff div,
.nav-cutoff strong {
  color: var(--nav);
}

.nav-cutoff strong {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.05;
}

.top-nav.has-long-cutoff {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px 6px;
}
.has-long-cutoff .nav-actions { display: contents; }
.has-long-cutoff .nav-cutoff {
  grid-column: 1 / -1;
  min-width: 0;
  white-space: normal;
  text-align: left;
  line-height: 1.5;
}
.has-long-cutoff .nav-cutoff div { display: inline; margin-right: 8px; }
.has-long-cutoff .nav-cutoff strong { display: inline; margin: 0; font-size: 12px; line-height: 1.5; }

.overview-hero .planning-period {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line2);
}

.planning-period span {
  color: var(--muted);
  font-size: 11.5px;
}

.planning-period strong {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  text-align: right;
}

.planning-overview-hero {
  margin-top: 14px;
}

.planning-progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.planning-progress-copy strong {
  color: var(--blue-ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.planning-overview-hero > .progress,
.activity-fee-preview > .progress {
  margin-top: 6px;
}

.planning-target-label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
}

.planning-target-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
}

.planning-target-value strong {
  color: var(--ink);
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.planning-target-value span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.planning-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--line2);
}

.planning-overview-grid > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.planning-overview-grid > span + span {
  padding-left: 14px;
  border-left: 1px solid var(--line2);
}

.planning-overview-grid small {
  color: var(--muted);
  font-size: 11.5px;
}

.planning-overview-grid strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.activity-fee-disclosure {
  display: block;
  padding: 0;
}

.activity-fee-disclosure > summary {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 15px 44px 15px 15px;
  cursor: pointer;
  list-style: none;
}

.activity-fee-disclosure > summary::-webkit-details-marker {
  display: none;
}

.activity-fee-disclosure > summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 19px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: translateY(-65%) rotate(45deg);
  transition: transform .16s ease;
}

.activity-fee-disclosure[open] > summary::after {
  transform: translateY(-25%) rotate(225deg);
}

.activity-fee-disclosure > summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.activity-fee-disclosure > summary > strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.activity-fee-disclosure > summary > span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.activity-fee-preview {
  padding: 14px 15px 15px;
  border-top: 1px solid var(--line2);
}

.activity-fee-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 13px;
}

.activity-fee-split > span {
  display: grid;
  gap: 3px;
}

.activity-fee-split > span + span {
  padding-left: 13px;
  border-left: 1px solid var(--line2);
}

.activity-fee-split small,
.activity-fee-preview-head span {
  color: var(--muted);
  font-size: 11px;
}

.activity-fee-split strong {
  color: var(--ink);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.activity-fee-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line2);
}

.activity-fee-preview-head strong {
  color: var(--ink);
  font-size: 13px;
}

@media (max-width: 374px) {
  .nav-cutoff {
    min-width: 76px;
    font-size: 10.5px;
  }

  .nav-cutoff strong {
    font-size: 14px;
  }

  .planning-period strong {
    font-size: 11.5px;
  }

  .planning-target-value strong {
    font-size: 42px;
  }
}

/* Full source text stays selectable; wide source tables scroll inside the drawer. */
.manual-document { min-width: 0; color: var(--ink); font-size: 14px; line-height: 1.8; }
.manual-document h2 { margin: 24px 0 10px; font-size: 17px; }
.manual-document p { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.manual-table-scroll { max-width: 100%; overflow-x: auto; margin: 12px 0 20px; border: 1px solid var(--line); border-radius: 12px; }
.manual-table-scroll table { width: 100%; border-collapse: collapse; font-size: 13px; }
.manual-table-scroll th, .manual-table-scroll td { min-width: 110px; padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; white-space: pre-wrap; }
.manual-table-scroll th { background: var(--blue-soft); font-weight: 650; }
.manual-image-viewport { max-width: 100%; overflow: auto; }
.manual-asset-item .manual-image-toggle { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.manual-image-toggle[aria-pressed="true"] { width: max-content; cursor: zoom-out; }
.manual-image-toggle[aria-pressed="true"] img { max-width: none; }

.quota-pool-details > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; }
.quota-pool-details { border-top: 1px solid var(--line, #e7edf5); }
.quota-pool-details > summary { cursor: pointer; list-style: none; }
.quota-pool-details > summary::after { content: '⌄'; color: var(--text-secondary, #75849b); }
.quota-pool-details > summary span { margin-left: auto; color: var(--text-secondary, #75849b); font-size: 12px; }
.quota-category, .quota-record { display: grid; gap: 5px; padding: 13px 0; border-bottom: 1px solid var(--line, #e7edf5); font-size: 13px; }
.quota-category span, .quota-category small, .quota-record span { color: var(--text-secondary, #75849b); font-size: 12px; }
/* Terminal monthly progress uses the existing phone business drawer. */
.terminal-monthly { color: #27313f; min-width: 0; }
.terminal-month-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin: 18px 0 12px; }
.terminal-month-heading h2 { margin: 0 0 6px; font-size: 18px; }
.terminal-month-heading p, .terminal-month-heading label { margin: 0; color: #62748a; font-size: 12px; }
.terminal-month-heading select { display: block; margin-top: 5px; padding: 8px; border: 1px solid #cbd9e8; border-radius: 8px; background: #fff; color: #27313f; font-size: 14px; }
.terminal-month-coverage { padding: 10px 12px; border-radius: 10px; background: #eaf4ff; color: #2d6a9f; font-size: 12px; }
.terminal-month-summary, .terminal-month-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 10px; }
.terminal-month-summary > div { min-width: 0; }
.terminal-month-summary span { display: block; color: #62748a; font-size: 11px; }
.terminal-month-summary strong { display: block; margin-top: 7px; font-size: 22px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.terminal-month-cards button { min-width: 0; padding: 12px 6px; border: 1px solid #dce7f0; border-radius: 10px; background: white; color: #27313f; text-align: left; }
.terminal-month-cards button.selected { border-color: #2d6a9f; background: #f4f9ff; }
.terminal-month-cards span, .terminal-month-cards small { display: block; font-size: 11px; }
.terminal-month-cards small { color: #62748a; margin-top: 6px; }
.terminal-month-cards strong { display: block; font-size: 19px; margin-top: 7px; overflow-wrap: anywhere; }
.terminal-month-cards .gap strong, .terminal-month-item.gap .terminal-month-values > strong { color: #bc3030; }
.terminal-month-cards .over strong, .terminal-month-item.over .terminal-month-values > strong { color: #168446; }
.terminal-month-cards .unplanned strong { color: #2d6a9f; }
.terminal-month-filters { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 8px; margin-top: 20px; }
.terminal-month-filters input, .terminal-month-filters select { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid #cbd9e8; border-radius: 8px; padding: 10px 8px; font-size: 12px; background: white; }
.terminal-month-item { border-bottom: 1px solid #e3ebf2; padding: 14px 0; }
.terminal-month-item summary { cursor: pointer; list-style: none; }
.terminal-month-item summary::-webkit-details-marker { display: none; }
.terminal-month-title strong { display: block; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.terminal-month-title small { display: block; color: #62748a; font-size: 11px; margin-top: 3px; overflow-wrap: anywhere; }
.terminal-month-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; align-items: start; font-size: 12px; margin-top: 12px; }
.terminal-month-values span { color: #62748a; }
.terminal-month-values b { display: block; color: #27313f; margin-top: 4px; font-variant-numeric: tabular-nums; }
.terminal-month-values > strong { grid-column: 1 / -1; line-height: 1.6; }
.terminal-month-values > span { min-width: 0; overflow-wrap: anywhere; }
.terminal-month-item[open] .terminal-month-list { margin-top: 14px; padding: 10px; background: #f6f9fc; border-radius: 8px; }
.terminal-refresh-error { padding: 10px; background: #fff3d5; font-size: 12px; }

/* Phone fees share one summary and compact category rows across all scopes. */
.quota-usage-card { padding: 0; border: 0; background: transparent; box-shadow: none; font-variant-numeric: tabular-nums; }
.quota-usage-card .bc-header { margin-bottom: 4px; }
.quota-usage-card .quota-month { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.quota-usage-card .quota-overview { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--blue-soft); }
.quota-usage-card .quota-label { font-size: 14px; color: var(--muted); }
.quota-usage-card .quota-headline { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 8px 16px; margin: 2px 0 18px; }
.quota-usage-card .quota-used { font-size: 44px; line-height: 1.2; letter-spacing: -1px; color: var(--blue-ink); overflow-wrap: anywhere; min-width: 0; }
.quota-usage-card .quota-unit { margin-left: 3px; font-size: 12px; font-weight: 400; letter-spacing: 0; }
.quota-usage-card .quota-used .quota-unit { font-size: 16px; }
.quota-usage-card .quota-rate { margin-left: auto; text-align: right; color: var(--muted); font-size: 13px; }
.quota-usage-card .quota-rate strong { display: block; color: var(--blue-ink); font-size: 20px; }
.quota-usage-card .quota-plan-balance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 15px; border-top: 1px solid var(--line); }
.quota-usage-card .quota-plan-balance div:last-child { text-align: right; }
.quota-usage-card .quota-plan-balance span { display: block; color: var(--muted); font-size: 13px; }
.quota-usage-card .quota-plan-balance strong { font-size: 19px; overflow-wrap: anywhere; }
.quota-usage-card .quota-note { margin: 10px 2px 0; font-size: 12px; color: var(--muted); }
.quota-usage-card .quota-list-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin: 22px 2px 8px; }
.quota-usage-card .quota-list-heading h3 { font-size: 16px; margin: 0; }
.quota-usage-card .quota-list-heading span { font-size: 12px; color: var(--muted); }
.quota-usage-card .quota-category-list { border: 1px solid var(--line); border-radius: 14px; background: var(--white); overflow: hidden; }
.quota-usage-card .activity-category { border-top: 0; }
.quota-usage-card .activity-category + .activity-category { border-top: 1px solid var(--line2); }
.quota-usage-card .activity-category > summary { display: grid; grid-template-columns: minmax(min-content, 1fr) auto 10px; gap: 5px 10px; align-items: baseline; padding: 16px; }
.quota-usage-card .activity-category > summary::-webkit-details-marker { display: none; }
.quota-usage-card .activity-category > summary::after { content: ''; grid-column: 3; grid-row: 1; width: 7px; height: 7px; align-self: center; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); }
.quota-usage-card .activity-category[open] > summary::after { transform: rotate(225deg); }
.quota-usage-card .activity-category > summary span { margin: 0; font-size: 13px; color: var(--muted); }
.quota-usage-card .quota-category-name { grid-column: 1; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.quota-usage-card .quota-category-used { grid-column: 2; text-align: right; font-size: 22px; line-height: 1.25; white-space: nowrap; }
.quota-usage-card .quota-category-plan { grid-column: 1; }
.quota-usage-card .quota-category-rate { grid-column: 2; text-align: right; overflow-wrap: anywhere; }
.quota-usage-card .quota-category-detail { margin: 0 16px 16px; padding-top: 12px; border-top: 1px solid var(--line2); }
.quota-usage-card .quota-balance { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; font-size: 14px; }
.quota-usage-card .quota-balance span { color: var(--muted); }
.quota-usage-card .quota-balance strong { overflow-wrap: anywhere; }
@media (max-width: 340px) {
  .quota-usage-card .quota-overview { padding: 18px; }
  .quota-usage-card .quota-used { font-size: 40px; }
  .quota-usage-card .quota-plan-balance strong { font-size: 18px; }
  .quota-usage-card .activity-category > summary { padding: 15px 13px; gap: 5px 8px; }
}
.county-monthly-records > summary { cursor: pointer; display: grid; gap: 6px; }
.county-monthly-records > summary small { color: var(--muted); }
.monthly-risk .risk-card p { font-size: 13px; line-height: 1.6; }

.navigation-loading { position: fixed; z-index: 70; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translateX(-50%); padding: 10px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 4px 16px #0002; pointer-events: none; }
[data-action="open-county"]:active, [data-action="open-office"]:active, [data-action="open-zone"]:active, [data-action^="back-"]:active, .drawer-tabs button:active { background-color: var(--blue-soft); box-shadow: inset 0 0 0 2px var(--blue); }
.report-controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.report-controls label { flex: 1; min-width: 120px; color: var(--muted); font-size: 12px; }
.report-controls select { display: block; width: 100%; margin-top: 5px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--ink); }
.regional-metric { padding: 12px 0; border-top: 1px solid var(--line); }
.report-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); gap: 12px; margin-top: 9px; font-size: 13px; }
.report-values span { display: grid; min-width: 0; gap: 4px; align-content: start; color: var(--muted); }
.report-values b { overflow-wrap: anywhere; }
.report-values b:not([class*="yoy-tone-"]) { color: var(--ink); }

.report-comparison { display: grid; grid-template-columns: 30px minmax(16px, 1fr) max-content; align-items: center; gap: 7px 8px; margin: 10px 0; font-size: 12px; }
.report-comparison-row { display: contents; }
.report-comparison-row > span { color: var(--muted); }
.report-comparison-row > strong { text-align: right; overflow-wrap: anywhere; }
.report-bar-track { position: relative; height: 9px; background: var(--bg); }
.report-bar-track i { position: absolute; top: -2px; bottom: -2px; border-left: 1px solid var(--line); }
.report-bar-track b { position: absolute; height: 100%; border-radius: 2px; background: var(--blue); }
.report-bar-track .report-bar-plan { background: var(--nav); }
.report-bar-track .report-bar-prior { background: var(--muted); opacity: .55; }
.report-trend-label { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.report-share { margin-top: 12px; }
.report-share .progress { height: 12px; margin-bottom: 6px; }

.county-monthly .monthly-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); font-size: 13px; line-height: 1.6; }
.county-monthly .monthly-row > strong { grid-column: 1 / -1; }

/* Keep business values and source descriptions readable on narrow phones. */
.county-row p.metric-sub { grid-column: 2 / -1; white-space: normal; overflow-wrap: anywhere; }
.county-sales-main { display: flex; flex-wrap: wrap; }
.county-sales-main > div { flex: 1 1 auto; max-width: 100%; }
.county-sales-main > div + div { padding-left: 0; border-left: 0; }
.county-sales-main strong { white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
.county-sales-head, .county-sales-foot, .terminal-month-heading { flex-wrap: wrap; }
.terminal-month-summary, .terminal-month-cards { display: flex; flex-wrap: wrap; }
.terminal-month-summary > div, .terminal-month-cards > button { flex: 1 1 86px; min-width: min-content; max-width: 100%; }
.terminal-month-summary span, .terminal-month-cards span, .terminal-month-cards small, .terminal-month-title small { font-size: 12px; }
.terminal-month-row { font-size: 12px; line-height: 1.5; }
.terminal-month-row strong { font-size: 12px; }
.terminal-month-row > *, .monthly-row > * { min-width: 0; overflow-wrap: anywhere; }
.notice-item, .faq-answer, .feedback-history, .profile-head { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 390px) {
  .top-nav { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; }
  .top-nav .nav-actions { display: contents; }
  .top-nav .nav-title { white-space: normal; overflow-wrap: anywhere; }
  .top-nav .nav-cutoff { grid-column: 1 / -1; min-width: 0; white-space: normal; text-align: left; line-height: 1.5; }
  .top-nav .nav-cutoff div { display: inline; margin-right: 8px; }
  .top-nav .nav-cutoff strong { display: inline; margin: 0; font-size: 13px; line-height: 1.5; }
}
