:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #64717d;
  --line: #dce3e8;
  --paper: #f7f9fa;
  --white: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 "Segoe UI", "Microsoft YaHei", sans-serif;
}

a { color: inherit; text-decoration: none; }

.shell { max-width: 1120px; margin: 0 auto; padding: 48px 24px 32px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 42px; }
.eyebrow { margin: 0 0 8px; color: #52708a; font-size: 12px; font-weight: 700; letter-spacing: 2px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(32px, 5vw, 52px); line-height: 1.1; letter-spacing: 0; }
.subtitle { margin-bottom: 0; color: var(--muted); }
.status-dot { margin-top: 8px; padding: 5px 10px; border: 1px solid #b9d9c5; border-radius: 999px; color: #287445; background: #f0faf3; font-size: 13px; white-space: nowrap; }
.section { padding: 28px 0 8px; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.section-heading h2 { margin-bottom: 0; font-size: 20px; }
.section-heading span { color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-small { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 746px; }
.tile { position: relative; display: flex; min-height: 214px; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-top: 4px solid; border-radius: 8px; background: var(--white); transition: transform .16s ease, box-shadow .16s ease; }
.tile:hover, .tile:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(23, 33, 43, .09); outline: none; }
.tile-label { margin-bottom: 22px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; }
.tile strong { margin-bottom: 8px; font-size: 22px; }
.tile > span:not(.tile-label):not(.tile-action) { color: var(--muted); }
.tile-action { margin-top: auto; padding-top: 22px; color: var(--ink); font-weight: 700; }
.accent-blue { border-top-color: #3d79b6; } .accent-green { border-top-color: #3f9270; } .accent-orange { border-top-color: #d27b38; } .accent-purple { border-top-color: #8062a9; } .accent-red { border-top-color: #bd5c5c; }
footer { padding-top: 42px; color: var(--muted); font-size: 13px; }
.calculator-section { padding-top: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.panel h2 { margin: 0 0 16px; font-size: 18px; }
.panel label { display: grid; grid-template-columns: 1fr 180px; align-items: center; gap: 16px; padding: 9px 0; color: var(--muted); border-bottom: 1px solid #edf1f3; }
.panel label:last-child { border-bottom: 0; }
.panel input { width: 100%; padding: 8px 10px; border: 1px solid #cfd9df; border-radius: 5px; color: var(--ink); background: #fbfcfd; font: inherit; text-align: right; }
.panel input:focus { border-color: #52708a; outline: 2px solid rgba(82, 112, 138, .16); }
.result-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.result-grid div { padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfd; }
.result-grid span, .result-grid strong { display: block; }
.result-grid span { color: var(--muted); font-size: 13px; }
.result-grid strong { margin-top: 5px; font-size: 20px; font-variant-numeric: tabular-nums; }
.result-grid .total { border-color: #b9d9c5; background: #f0faf3; }
.formula { margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.price-table-wrap { overflow-x: auto; }
.price-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.price-table th, .price-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.price-table th:first-child, .price-table td:first-child { text-align: left; }
.price-table th { color: var(--muted); font-size: 13px; font-weight: 500; }
.price-table input { width: 96px; padding: 7px 8px; border: 1px solid #cfd9df; border-radius: 5px; color: var(--ink); background: #fbfcfd; font: inherit; text-align: right; }
.price-table input:focus { border-color: #52708a; outline: 2px solid rgba(82, 112, 138, .16); }
.price-table td b { display: inline-block; padding: 2px 9px; border-radius: 999px; color: #2459b8; background: #e5efff; font-weight: 500; }
.price-table td small { display: block; margin-top: 5px; color: var(--muted); }
.price-table .active-row { background: #effaf4; }

@media (max-width: 720px) {
  .shell { padding: 30px 16px 24px; }
  .topbar { flex-direction: column; padding-bottom: 30px; }
  .grid, .grid-small { grid-template-columns: 1fr; max-width: none; }
  .form-grid, .result-grid { grid-template-columns: 1fr; }
  .panel label { grid-template-columns: 1fr 150px; }
  .tile { min-height: 190px; }
}
