/* Shared portal chrome for calculator pages */
.back-link {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  z-index: 20;
  color: #c5d0de;
  text-decoration: none;
  font-family: Outfit, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(10, 14, 20, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.back-link:hover {
  color: #e8eef6;
  background: rgba(10, 14, 20, 0.7);
}

body.has-tool {
  align-items: start;
  padding-top: 64px;
}

.tool {
  width: min(100%, 420px);
  background: linear-gradient(180deg, #2c3d55 0%, #243044 40%, #1a2433 100%);
  border-radius: 28px;
  padding: 22px 18px 18px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tool__brand {
  margin: 0 0 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  color: #e8eef6;
}

.tool label {
  display: block;
  color: #7a8aa0;
  font-size: 0.85rem;
  margin-bottom: 6px;
  font-family: Outfit, sans-serif;
}

.tool input,
.tool select {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  background: #0a0e14;
  color: #e8eef6;
  font: inherit;
  margin-bottom: 12px;
  outline: none;
}

.tool__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tool__btn {
  appearance: none;
  border: none;
  width: 100%;
  border-radius: 14px;
  padding: 14px;
  font-family: Outfit, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: #2a9d8f;
  color: #f2fffc;
  margin-top: 4px;
}

.tool__btn:hover { background: #34b3a3; }

.tool__result {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(10, 14, 20, 0.55);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #34b3a3;
  text-align: right;
  min-height: 1.4em;
}

.tool__hint {
  margin: 10px 0 0;
  color: #7a8aa0;
  font-size: 0.82rem;
  font-family: Outfit, sans-serif;
}
