:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #687385;
  --line: #d7dde7;
  --paper: #f5f7fb;
  --panel: #ffffff;
  --brand: #0d4f8b;
  --brand-dark: #083761;
  --accent: #b98a2f;
  --danger: #b3261e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 18px;
}

.hero.compact {
  padding-bottom: 8px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
}

h1, h2, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: 0;
}

h2 {
  font-size: 20px;
}

.subtle {
  color: var(--muted);
  line-height: 1.7;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(24, 33, 47, 0.06);
}

.compact-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  margin-top: 12px;
}

.price-note {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(24, 33, 47, 0.04);
}

.price-note strong {
  color: var(--brand-dark);
}

.price-note span,
.price-note em {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  line-height: 1.45;
}

.rate-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 22px;
  border-radius: 8px;
  background: var(--brand-dark);
  color: #fff;
  box-shadow: 0 12px 30px rgba(8, 55, 97, 0.18);
}

.rate-card .eyebrow {
  color: #f0c879;
}

.rate-card h2 {
  margin-bottom: 16px;
  font-size: 24px;
}

.rates {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.rate-item {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.rate-item span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.4;
}

.rate-item strong {
  font-size: 22px;
  letter-spacing: 0;
}

.consult-box {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.consult-box img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.consult-box strong {
  display: block;
  margin-bottom: 8px;
}

.consult-box p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.consult-box.compact {
  grid-template-columns: 82px minmax(0, 1fr);
  padding: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(24, 33, 47, 0.04);
}

.consult-box.compact img {
  width: 82px;
  height: 82px;
}

.consult-box.compact p {
  font-size: 13px;
  line-height: 1.45;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.field, .check {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 700;
}

.check {
  justify-content: end;
  flex-direction: row;
  align-items: center;
  min-height: 72px;
}

.wide {
  grid-column: 1 / -1;
}

input, select, button {
  min-height: 44px;
  border-radius: 6px;
  font: inherit;
  max-width: 100%;
}

input, select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  padding: 0 12px;
  background: #fff;
}

input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
}

button, .staff-link {
  border: 0;
  padding: 0 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 6px;
  font-weight: 700;
}

.primary {
  background: var(--brand);
  color: #fff;
}

button.primary.wide {
  width: 100%;
}

.secondary, .staff-link {
  background: #e8eef6;
  color: var(--brand-dark);
}

.toolbar {
  display: flex;
  gap: 12px;
  margin: 8px 0 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(24, 33, 47, 0.05);
}

.stat-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  font-size: 24px;
  color: var(--brand-dark);
}

.stat-card.alert strong {
  color: var(--danger);
}

.result {
  margin-top: 18px;
}

.hidden {
  display: none;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.list {
  display: grid;
  gap: 12px;
}

.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcff;
}

.item strong {
  display: block;
  margin-bottom: 6px;
}

.meta {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.danger {
  background: #fae8e6;
  color: var(--danger);
}

@media (max-width: 760px) {
  .shell {
    width: min(390px, calc(100vw - 24px));
    padding: 14px 0 20px;
  }

  .hero, .split, .rate-card, .compact-info, .stats-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero {
    gap: 10px;
    padding: 12px 0 10px;
  }

  h1 {
    margin-bottom: 6px;
    font-size: 30px;
  }

  .eyebrow {
    margin-bottom: 5px;
    font-size: 13px;
  }

  .subtle {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.55;
  }

  .staff-link {
    min-height: 38px;
  }

  .panel {
    padding: 14px;
  }

  .form-grid {
    gap: 10px;
  }

  .field {
    gap: 6px;
    font-size: 14px;
  }

  input, select, button {
    min-height: 39px;
  }

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

  .compact-info {
    gap: 10px;
    margin-top: 10px;
  }

  .price-note {
    gap: 4px;
    padding: 11px 12px;
  }

  .price-note span,
  .price-note em {
    font-size: 12px;
    line-height: 1.35;
  }

  .consult-box {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .consult-box img {
    width: 96px;
    height: 96px;
  }

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

  .check {
    justify-content: start;
    min-height: 34px;
  }

  .consult-box.compact {
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 10px 12px;
  }

  .consult-box.compact img {
    width: 72px;
    height: 72px;
  }

  .consult-box.compact strong {
    margin-bottom: 4px;
    font-size: 14px;
  }

  .consult-box.compact p {
    font-size: 12px;
    line-height: 1.35;
  }
}

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

  .consult-box {
    grid-template-columns: 1fr;
  }
}
