:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #eeede7;
  --ink: #24231f;
  --ink-2: #56544c;
  --muted: #6b685d;
  --line: #e7e5dc;
  --line-strong: #d9d6ca;
  --accent: #5f7c61;
  --accent-deep: #42584a;
  --accent-soft: #e6ece1;
  --ok: #4f9d6b;
  --shadow-sm: 0 1px 2px rgba(36, 35, 31, 0.05), 0 4px 12px rgba(36, 35, 31, 0.05);
  --font-display: 'Space Grotesk', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
}

* { box-sizing: border-box; }

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

a {
  color: inherit;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

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

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

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

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

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

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

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

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

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

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

.main {
  flex: 1;
  width: min(960px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 60px;
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 22px;
  align-items: start;
}

.hero {
  grid-column: 1 / -1;
  max-width: 760px;
  margin-bottom: 14px;
}

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

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

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

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

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

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

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

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

.panel__body {
  padding: 20px;
}

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

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

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

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

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

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

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}

.metric__label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.metric__value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric__value--positive {
  color: var(--ok);
}

.chart {
  width: 100%;
  height: 360px;
}

.footer {
  padding: 16px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}
/* ===== 社保缴费计算器 特有样式 ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.custom-box { margin: 4px 0 18px; padding: 16px 18px; border: 1px dashed var(--line-strong, #d9d6ca); border-radius: var(--radius-control, 10px); background: var(--surface-2, #eeede7); }
.field__hint { margin: 0 0 12px; font-size: 12.5px; line-height: 1.6; color: var(--muted, #6b685d); }
.note { font-size: 12.5px; line-height: 1.6; color: var(--muted, #6b685d); margin: 6px 0 0; }
.hidden { display: none; }
.ss-table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.ss-table th, .ss-table td { text-align: right; padding: 10px 12px; border-bottom: 1px solid var(--line, #e7e5dc); font-size: 14px; }
.ss-table th:first-child, .ss-table td:first-child { text-align: left; }
.ss-table th { color: var(--muted, #6b685d); font-weight: 600; font-size: 12px; }
.ss-table td.co { color: var(--accent-deep, #42584a); font-weight: 600; font-family: var(--font-mono, monospace); }
.ss-table td.pe { color: var(--ink, #24231f); font-weight: 600; font-family: var(--font-mono, monospace); }
.method-box { margin-top: 20px; padding: 16px 18px; border: 1px solid var(--line, #e7e5dc); border-radius: var(--radius-control, 10px); background: var(--surface-2, #eeede7); }
.method-title { margin: 0 0 10px; font-size: 15px; color: var(--accent-deep, #42584a); }
.method-list { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.8; color: var(--ink-2, #56544c); }
.method-list li { margin: 6px 0; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
/* ===== v2 下拉 / 明细行 ===== */
select { font: inherit; color: var(--ink, #24231f); min-height: 44px; width: 100%; padding: 0 34px 0 13px; border: 1px solid var(--line-strong, #d9d6ca); border-radius: var(--radius-control, 10px); background-color: var(--surface, #fff); appearance: none; -webkit-appearance: none; cursor: pointer; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2356544c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; transition: border-color .18s, box-shadow .18s; }
select:focus { outline: none; border-color: var(--accent, #5f7c61); box-shadow: 0 0 0 3px rgba(95,124,97,.18); }
.detail-line { margin: 16px 0 8px; padding: 12px 14px; background: var(--surface-2, #eeede7); border: 1px solid var(--line, #e7e5dc); border-radius: var(--radius-control, 10px); font-size: 13px; line-height: 1.7; color: var(--muted, #6b685d); }
.detail-line b { color: var(--accent-deep, #42584a); font-weight: 600; }
.field__control--split { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.field__control--split select { flex: 1 1 180px; min-width: 0; }
.ratio-box { margin: 6px 0 16px; padding: 16px 18px 6px; border: 1px solid var(--line, #e7e5dc); border-radius: var(--radius-control, 10px); background: var(--surface-2, #eeede7); }
.ratio-head { font-size: 14px; font-weight: 600; color: var(--accent-deep, #42584a); margin: 0 0 4px; }
.grid-2 > * { min-width: 0; }
.grid-2 .field { min-width: 0; }
.grid-2 .field__control { min-width: 0; }
