:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --muted-surface: #f7f8fa;
  --border: #e6e8ee;
  --text: #0f172a;
  --muted: #5b6475;
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --ring: rgba(37, 99, 235, 0.25);
  --success: #16a34a;
  --danger: #dc2626;
  --maxw: 1080px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text);
}
.brand:hover {
  text-decoration: none;
}

.logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: conic-gradient(from 180deg, #60a5fa, #34d399, #fbbf24, #60a5fa);
  box-shadow: inset 0 0 0 1px #dbe1f1, 0 6px 14px rgba(2, 6, 23, 0.12);
}

.links a {
  font-size: 14px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
}
.links a:hover {
  background: var(--muted-surface);
  color: var(--text);
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px;
}

.hero {
  padding: 56px 0 8px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

h1 {
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.lead {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 17px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card-title {
  margin: 0 0 8px;
  font-size: 22px;
}

form {
  display: grid;
  gap: 12px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .row {
    grid-template-columns: 1fr;
  }
}

.field label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

input,
select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border 0.15s, box-shadow 0.15s, background 0.15s;
}
input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
}

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

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--border);
  background: var(--muted-surface);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover {
  background: #eef2ff;
  border-color: #dbeafe;
}

.btn-primary {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: #fff;
  border-color: transparent;
}
.btn-primary:hover {
  filter: brightness(0.98);
}

.results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
@media (max-width: 960px) {
  .results {
    grid-template-columns: 1fr;
  }
}

.metric {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.metric h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.value {
  font-size: 26px;
  font-weight: 700;
}

.section {
  margin-top: 36px;
}

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

.list-item {
  padding: 12px;
  border: 1px dashed #e5e7eb;
  border-radius: 10px;
  background: var(--muted-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 12px;
  text-align: left;
}
thead th {
  background: #f8fafc;
}

.note {
  color: var(--muted);
  font-size: 13px;
}

.footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  background: #fff;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 20px 40px;
  display: grid;
  gap: 10px;
}
.share {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
