:root {
  --bg: #0b1220;
  --bg-soft: #121a2b;
  --panel: #162033;
  --panel-2: #1b2740;
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef3ff;
  --muted: #9aacc7;
  --accent: #5eead4;
  --accent-2: #60a5fa;
  --warn: #fbbf24;
  --good: #34d399;
  --bad: #fb7185;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(94, 234, 212, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(96, 165, 250, 0.14), transparent 50%),
    var(--bg);
  min-height: 100vh;
}

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

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(11, 18, 32, 0.72);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.7rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #041018;
  font-weight: 800;
}

.brand strong { display: block; line-height: 1.1; }
.brand span { display: block; color: var(--muted); font-size: 0.78rem; }

.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero {
  padding: 2.4rem 0 1.2rem;
}

.kicker {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.lead {
  max-width: 52rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 1.2rem;
}

.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 40%), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
}

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--text);
}

.city-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

input[type="text"], input[type="number"], select, button, textarea {
  font: inherit;
}

input[type="text"], input[type="number"], select {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  outline: none;
}

input[type="text"]:focus, select:focus, input[type="number"]:focus {
  border-color: rgba(94, 234, 212, 0.55);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
}

#citySearch {
  flex: 1 1 220px;
  min-width: 180px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 0.72rem 0.95rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #2dd4bf);
  color: #042f2e;
  font-weight: 700;
}

button.secondary {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 600;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2.4rem;
  margin-bottom: 0.9rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.55rem 0.4rem 0.7rem;
  font-size: 0.92rem;
}

.chip button {
  background: transparent;
  color: var(--muted);
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  font-weight: 700;
}

.chip button:hover { color: var(--bad); background: rgba(251, 113, 133, 0.12); }

.controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

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

.field label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}

.field input, .field select { width: 100%; }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 0.9rem;
}

th, td {
  padding: 0.55rem 0.45rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

th {
  position: sticky;
  top: 0;
  background: #10192b;
  color: var(--muted);
  font-weight: 600;
  z-index: 1;
}

th:first-child, td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: #121c30;
  z-index: 2;
  min-width: 8.5rem;
}

.cell {
  border-radius: 8px;
  min-width: 2.4rem;
  display: inline-block;
  padding: 0.28rem 0.2rem;
}

.cell.good { background: rgba(52, 211, 153, 0.22); color: #bbf7d0; }
.cell.ok { background: rgba(96, 165, 250, 0.16); color: #dbeafe; }
.cell.bad { background: rgba(251, 113, 133, 0.12); color: #fecdd3; }
.cell.best { outline: 2px solid rgba(94, 234, 212, 0.7); background: rgba(94, 234, 212, 0.22); color: #ccfbf1; }

.summary-box {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  min-height: 7rem;
  white-space: pre-wrap;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.suggest-list {
  margin: 0.35rem 0 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.suggest-list button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 500;
  padding: 0.35rem 0.6rem;
}

.suggest-list button:hover {
  color: var(--text);
  border-color: rgba(96, 165, 250, 0.45);
}

.note {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0 2rem;
}

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

.feature {
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}

.feature h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }

.prose {
  padding: 2rem 0 3rem;
  max-width: 760px;
}

.prose h1 { font-size: 2rem; }
.prose h2 { margin-top: 1.8rem; font-size: 1.25rem; }
.prose p, .prose li { color: var(--muted); line-height: 1.7; }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding: 1.4rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: #0f766e;
  color: white;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.best-list {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.best-list li { margin: 0.25rem 0; }
.best-list strong { color: var(--text); }
