:root {
  --brand: #0b5fa5;
  --brand-dark: #084a80;
  --brand-soft: #e9f1f9;
  --text: #1c2430;
  --muted: #6b7785;
  --line: #e4e8ee;
  --bg: #f4f6f9;
  --ok: #12805c;
  --ok-soft: #e6f4ef;
  --warn: #b25b00;
  --warn-soft: #fdf3e5;
  --danger: #b3261e;
  --danger-soft: #fbeceb;
  --radius: 14px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px calc(32px + env(safe-area-inset-bottom));
}

.page-head {
  padding: 20px 4px 14px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}

.card-sub {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.65;
}

.field {
  margin-bottom: 18px;
}

.field:last-child {
  margin-bottom: 0;
}

.field > label {
  display: block;
  font-size: 14.5px;
  font-weight: 500;
  margin-bottom: 8px;
}

.hint {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.55;
}

input[type='text'],
input[type='tel'],
input[type='number'],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
  color: var(--text);
  font-family: inherit;
  appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 95, 165, 0.1);
}

select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%236b7785' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.choices {
  display: grid;
  gap: 10px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice .dot {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 2px solid #c3cbd6;
  border-radius: 50%;
  position: relative;
}

.choice .label {
  font-size: 15px;
  line-height: 1.45;
}

.choice.checked {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.choice.checked .dot {
  border-color: var(--brand);
}

.choice.checked .dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--brand);
}

.readonly-field {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f6f8fa;
  color: var(--muted);
  font-size: 16px;
  letter-spacing: 1px;
}

button {
  font-family: inherit;
  font-size: 16px;
  border: none;
  cursor: pointer;
}

.btn {
  display: block;
  width: 100%;
  min-height: 50px;
  border-radius: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

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

.btn-primary:active {
  background: var(--brand-dark);
}

.btn-primary:disabled {
  background: #b8c4d2;
  cursor: not-allowed;
}

.btn-ghost {
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--line);
}

.btn-link {
  background: none;
  color: var(--muted);
  font-size: 14px;
  padding: 12px 0;
  text-align: center;
  width: 100%;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.slider-row input[type='range'] {
  flex: 1;
  min-height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  accent-color: var(--brand);
}

.slider-value {
  min-width: 64px;
  text-align: right;
  font-size: 17px;
  font-weight: 600;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.steps {
  display: flex;
  margin: 4px 0 18px;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
  font-size: 12px;
  color: var(--muted);
}

.step::before {
  content: '';
  display: block;
  width: 22px;
  height: 22px;
  margin: 0 auto 7px;
  border-radius: 50%;
  background: #dfe5ec;
  color: #fff;
  font-size: 12px;
  line-height: 22px;
  position: relative;
  z-index: 1;
}

.step::after {
  content: '';
  position: absolute;
  top: 11px;
  left: calc(50% + 15px);
  width: calc(100% - 30px);
  height: 2px;
  background: #dfe5ec;
}

.step:last-child::after {
  display: none;
}

.step.done::before {
  background: var(--ok);
  content: '✓';
}

.step.done::after {
  background: var(--ok);
}

.step.current::before {
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.step.current {
  color: var(--brand);
  font-weight: 600;
}

.status-box {
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

.status-box.info {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.status-box.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.status-box.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.status-box .status-label {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.status-box .status-desc {
  font-size: 13.5px;
  line-height: 1.6;
  opacity: 0.9;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.kv:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.kv:first-child {
  padding-top: 0;
}

.kv .k {
  color: var(--muted);
  flex: 0 0 auto;
}

.kv .v {
  text-align: right;
  font-weight: 500;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  position: relative;
  padding: 0 0 18px 24px;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}

.timeline li::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 18px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li:last-child::after {
  display: none;
}

.timeline .t-title {
  font-size: 14.5px;
  font-weight: 500;
}

.timeline .t-time {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.timeline .t-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  background: #f7f9fb;
  border-radius: 8px;
  padding: 8px 10px;
}

.notice {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.notice.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.notice.info {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14.5px;
}

.loading {
  text-align: center;
  padding: 80px 0;
  color: var(--muted);
}

.spinner {
  width: 26px;
  height: 26px;
  margin: 0 auto 12px;
  border: 2.5px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.footnote {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
  padding: 4px 6px 0;
}

/* 备案号：底部一行，小字、居中，不抢内容注意力 */
.site-foot {
  padding: 18px 6px 26px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.site-foot a {
  color: var(--muted);
  text-decoration: none;
}

.site-foot a:hover,
.site-foot a:focus-visible {
  text-decoration: underline;
}

/* 「把这句话发给顾问」：没有可点链接时，让用户长按就能复制 */
.copybox {
  background: var(--bg-soft, #f5f6f8);
  border: 1px dashed var(--line, #d8dbe2);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.7;
  margin-bottom: 14px;
  user-select: text;
  -webkit-user-select: text;
}

.linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--brand-dark, #1a63c4);
  text-decoration: underline;
  cursor: pointer;
}

/* 测算结果 */
.result-card {
  border-top: 3px solid var(--brand);
}

/* 不满足按月领取条件：先说结论，再谈金额 */
.result-blocked {
  background: var(--danger-soft);
  border: 1px solid #f0c9c6;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.rb-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 4px;
}

.rb-desc {
  font-size: 13px;
  line-height: 1.65;
  color: #7d2a24;
}

/* 参考金额不做好看的强调，避免被当成可领的钱 */
.result-amount.muted {
  color: var(--muted);
}

.result-label {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 1px;
}

.result-amount {
  font-size: 40px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.15;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.result-amount span {
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
}

.result-sub {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.6;
}

.result-split {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.rs {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #f6f9fc;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--muted);
}

.rs b {
  color: var(--text);
}

.sec-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  margin: 22px 0 8px;
  padding-left: 9px;
  border-left: 3px solid var(--brand);
}

/* 三种社平工资情景：点一档，展开这一档的构成和推算过程 */
.sc-list {
  margin-top: 12px;
  display: grid;
  gap: 9px;
}

.sc-item {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
}

.sc-item.main {
  border-color: #bcd3e8;
}

.sc-item.open {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.sc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  background: none;
  border: 0;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.sc-name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
}

.sc-name i {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
  vertical-align: 2px;
}

.sc-amt {
  font-size: 19px;
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sc-amt small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 3px;
}

.sc-caret {
  flex: none;
  font-size: 12px;
  color: var(--muted);
}

.sc-body {
  padding: 2px 14px 14px;
}

.sc-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed #dbe3ec;
  font-size: 14px;
  color: var(--muted);
}

.sc-line b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sc-line.sc-sum {
  border-bottom: 0;
  padding-bottom: 2px;
  font-weight: 600;
  color: var(--text);
}

.sc-line.sc-sum b {
  font-size: 17px;
  color: var(--brand);
}

.sc-line.sc-sum b small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 3px;
}

.sc-title {
  margin: 14px 0 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
}

.kv.kv-dense {
  padding: 5px 0;
  font-size: 13px;
}

.kv.kv-dense .k {
  color: var(--muted);
}

.kv.kv-dense .v {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.issue {
  border-radius: 9px;
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 8px;
  background: #f7f9fb;
  border-left: 3px solid var(--line);
}

.issue b {
  display: block;
  margin-bottom: 2px;
}

.issue.warn {
  background: var(--warn-soft);
  border-left-color: #e3a33a;
  color: #7a4500;
}

.issue.critical {
  background: var(--danger-soft);
  border-left-color: var(--danger);
  color: var(--danger);
}

.issue.info {
  background: var(--ok-soft);
  border-left-color: var(--ok);
  color: #0d6349;
}

.years {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.years summary {
  font-size: 14px;
  color: var(--brand);
  cursor: pointer;
  list-style: none;
}

.years summary::-webkit-details-marker {
  display: none;
}

.years summary::after {
  content: '  展开';
  color: var(--muted);
  font-size: 12.5px;
}

.years[open] summary::after {
  content: '  收起';
}

.years-body {
  margin-top: 6px;
}

.years-body .kv {
  font-size: 13.5px;
  padding: 8px 0;
}

.result-notes {
  margin-top: 16px;
  padding: 12px 14px;
  background: #f7f9fb;
  border-radius: 10px;
}

.result-notes p {
  margin: 0 0 6px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}

.result-notes p:last-child {
  margin-bottom: 0;
}

.result-foot {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.result-range {
  margin-top: 12px;
  font-size: 13px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
}

.result-disclaimer {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  text-align: center;
}

.share-foot {
  margin: 18px 4px 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
}

.hidden {
  display: none !important;
}

/* —— 申请详情与首页列表：可点开的行 —— */
.kv-link {
  cursor: pointer;
}

/* 历史申请那条用的是 button：清掉 UA 样式，让它和旁边的 .kv 行长得一样 */
button.kv-link {
  width: 100%;
  margin: 0;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  font: inherit;
  color: inherit;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}

button.kv-link:last-child {
  border-bottom: none;
}

.kv-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

.kv-link:active {
  background: var(--brand-soft);
}

.kv-link .v {
  color: var(--brand);
}

.foot-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.foot-actions .btn-link {
  flex: 1;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}
