body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  background: #0b1020;
  color: #f5f5f5;
}

header {
  background: #141a33;
  border-bottom: 1px solid #242a44;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 {
  font-size: 1.1rem;
  margin: 0;
}

nav a {
  margin-right: 1rem;
  color: #9cf;
  text-decoration: none;
  font-size: 0.9rem;
}

nav a:last-child {
  margin-right: 0;
}

nav a:hover {
  text-decoration: underline;
}

main {
  padding: 1.5rem;
}

.card {
  background: #141a33;
  border: 1px solid #242a44;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.field {
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
}

.field.inline {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

label {
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
  color: #c7d0ff;
}

input, button {
  font: inherit;
}

input[type="text"],
input[type="number"] {
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  border: 1px solid #313959;
  background: #0b1020;
  color: #f5f5f5;
}

button {
  margin-top: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  border: 1px solid #4b8cff;
  background: #2b3a70;
  color: #f5f5f5;
  cursor: pointer;
}

button:hover {
  background: #3654a0;
}

.result h2 {
  margin-top: 0;
}

.notes {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #a0a9d5;
}

.info {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  color: #888;
  font-size: 13px;
  font-weight: normal;
  line-height: 14px;
  text-align: center;
  cursor: help;
  user-select: none;
  position: relative;
}

/* Beautiful tooltip on hover */
.info:hover::after {
  content: attr(title);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 120%;
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: pre-line;
  z-index: 1000;
  width: max-content;
  max-width: 280px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  pointer-events: none;
}

.info:hover::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 110%;
  border: 6px solid transparent;
  border-top-color: #333;
  z-index: 1000;
}